Skip to content

Commit

Permalink
Merge pull request #20540 from holiman/verbose_panic
Browse files Browse the repository at this point in the history
core/state: add more verbosity to panic
  • Loading branch information
karalabe authored Jan 10, 2020
2 parents b211742 + fc39239 commit b5c4ea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (s *StateDB) AddRefund(gas uint64) {
func (s *StateDB) SubRefund(gas uint64) {
s.journal.append(refundChange{prev: 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
}
Expand Down

0 comments on commit b5c4ea5

Please sign in to comment.