Added proper gas handling

This commit is contained in:
obscuren
2014-04-18 13:41:07 +02:00
parent c5729d7ecc
commit a96c8c8af9
5 changed files with 26 additions and 20 deletions

View File

@@ -27,14 +27,15 @@ type Closure struct {
State *State
Gas *big.Int
Price *big.Int
Value *big.Int
Args []byte
}
// Create a new closure for the given data items
func NewClosure(callee Callee, object Reference, script []byte, state *State, gas, val *big.Int) *Closure {
return &Closure{callee, object, script, state, gas, val, nil}
func NewClosure(callee Callee, object Reference, script []byte, state *State, gas, price, val *big.Int) *Closure {
return &Closure{callee, object, script, state, gas, price, val, nil}
}
// Retuns the x element in data slice