From 18a7d313386194be39e733ac3043988690f42464 Mon Sep 17 00:00:00 2001 From: Jim McDonald Date: Mon, 15 Jan 2018 10:57:06 +0000 Subject: miner: avoid unnecessary work (#15883) --- core/gaspool.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/gaspool.go') 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) } -- cgit v1.2.3