aboutsummaryrefslogtreecommitdiffstats
path: root/core/gaspool.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-04-07 16:03:11 +0800
committerGitHub <noreply@github.com>2017-04-07 16:03:11 +0800
commitcc13d576f07fb6803e09fb42880591a67b8b0ef6 (patch)
tree6b2371c34416e3697443d836aab3a1f7fc32e77a /core/gaspool.go
parent71fdaa42386173da7bfa13f1728c394aeeb4eb01 (diff)
parent158d603528d2ba36b633a8f22a2bff8329f69717 (diff)
downloaddexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar
dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.gz
dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.bz2
dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.lz
dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.xz
dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.tar.zst
dexon-cc13d576f07fb6803e09fb42880591a67b8b0ef6.zip
Merge pull request #13870 from karalabe/miners-fixes
all: clean up various error handling in core and the miner
Diffstat (limited to 'core/gaspool.go')
-rw-r--r--core/gaspool.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/gaspool.go b/core/gaspool.go
index f1c64c97a..ef99908cf 100644
--- a/core/gaspool.go
+++ b/core/gaspool.go
@@ -35,7 +35,7 @@ func (gp *GasPool) AddGas(amount *big.Int) *GasPool {
func (gp *GasPool) SubGas(amount *big.Int) error {
i := (*big.Int)(gp)
if i.Cmp(amount) < 0 {
- return &GasLimitErr{Have: new(big.Int).Set(i), Want: amount}
+ return ErrGasLimitReached
}
i.Sub(i, amount)
return nil