Skip to content

Commit b5c4ea5

Browse files
authored
Merge pull request #20540 from holiman/verbose_panic
core/state: add more verbosity to panic
2 parents b211742 + fc39239 commit b5c4ea5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎core/state/statedb.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func (s *StateDB) AddRefund(gas uint64) {
204204
func (s *StateDB) SubRefund(gas uint64) {
205205
s.journal.append(refundChange{prev: s.refund})
206206
if gas > s.refund {
207-
panic("Refund counter below zero")
207+
panic(fmt.Sprintf("Refund counter below zero (gas: %d > refund: %d)", gas, s.refund))
208208
}
209209
s.refund -= gas
210210
}

0 commit comments

Comments
 (0)