mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 00:39:26 +00:00
core/state: add more verbosity to panic
This commit is contained in:
parent
b211742e5f
commit
fc392395fb
1 changed files with 1 additions and 1 deletions
|
|
@ -204,7 +204,7 @@ func (s *StateDB) AddRefund(gas uint64) {
|
||||||
func (s *StateDB) SubRefund(gas uint64) {
|
func (s *StateDB) SubRefund(gas uint64) {
|
||||||
s.journal.append(refundChange{prev: s.refund})
|
s.journal.append(refundChange{prev: s.refund})
|
||||||
if gas > s.refund {
|
if gas > s.refund {
|
||||||
panic("Refund counter below zero")
|
panic(fmt.Sprintf("Refund counter below zero (gas: %d > refund: %d)", gas, s.refund))
|
||||||
}
|
}
|
||||||
s.refund -= gas
|
s.refund -= gas
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue