core/state: add more verbosity to panic

pull/20540/head
Martin Holst Swende 5 years ago
parent b211742e5f
commit fc392395fb
No known key found for this signature in database
GPG Key ID: 683B438C05A5DDF0
  1. 2
      core/state/statedb.go

@ -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
}

Loading…
Cancel
Save