(amount uint64)
| 143 | } |
| 144 | |
| 145 | func (st *StateTransition) useGas(amount uint64) error { |
| 146 | if st.gas < amount { |
| 147 | return vm.ErrOutOfGas |
| 148 | } |
| 149 | st.gas -= amount |
| 150 | |
| 151 | return nil |
| 152 | } |
| 153 | |
| 154 | func (st *StateTransition) buyGas() error { |
| 155 | mgval := new(big.Int).Mul(new(big.Int).SetUint64(st.msg.Gas()), st.gasPrice) |