aboutsummaryrefslogtreecommitdiffstats
path: root/core/gaspool.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/gaspool.go')
-rw-r--r--core/gaspool.go5
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)
}