AddGas makes gas available for execution.
(amount uint64)
| 27 | |
| 28 | // AddGas makes gas available for execution. |
| 29 | func (gp *GasPool) AddGas(amount uint64) *GasPool { |
| 30 | if uint64(*gp) > math.MaxUint64-amount { |
| 31 | panic("gas pool pushed above uint64") |
| 32 | } |
| 33 | *(*uint64)(gp) += amount |
| 34 | return gp |
| 35 | } |
| 36 | |
| 37 | // SubGas deducts the given amount from the pool if enough gas is |
| 38 | // available and returns an error otherwise. |
no outgoing calls
no test coverage detected