No longer store script directly in the state tree

This commit is contained in:
obscuren
2014-05-20 11:19:07 +02:00
parent a2fb265563
commit fd19142c0d
11 changed files with 70 additions and 52 deletions

View File

@@ -122,7 +122,7 @@ func (block *Block) Transactions() []*Transaction {
}
func (block *Block) PayFee(addr []byte, fee *big.Int) bool {
contract := block.state.GetContract(addr)
contract := block.state.GetStateObject(addr)
// If we can't pay the fee return
if contract == nil || contract.Amount.Cmp(fee) < 0 /* amount < fee */ {
fmt.Println("Contract has insufficient funds", contract.Amount, fee)