diff options
author | Jim McDonald <Jim@mcdee.net> | 2018-01-15 18:57:06 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-15 18:57:06 +0800 |
commit | 18a7d313386194be39e733ac3043988690f42464 (patch) | |
tree | b7aa8f4db37b3e007ae251ac36d579509f735451 /core | |
parent | 938cf4528ab5acbb6013be79a0548956713807a8 (diff) | |
download | go-tangerine-18a7d313386194be39e733ac3043988690f42464.tar.gz go-tangerine-18a7d313386194be39e733ac3043988690f42464.tar.zst go-tangerine-18a7d313386194be39e733ac3043988690f42464.zip |
miner: avoid unnecessary work (#15883)
Diffstat (limited to 'core')
-rw-r--r-- | core/gaspool.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/gaspool.go b/core/gaspool.go index c3ee5c198..e3795c1ee 100644 --- a/core/gaspool.go +++ b/core/gaspool.go @@ -44,6 +44,11 @@ func (gp *GasPool) SubGas(amount uint64) error { return nil } +// Gas returns the amount of gas remaining in the pool. +func (gp *GasPool) Gas() uint64 { + return uint64(*gp) +} + func (gp *GasPool) String() string { return fmt.Sprintf("%d", *gp) } |