From fc392395fbb7d26d8b2123b12402225b9d4324d3 Mon Sep 17 00:00:00 2001
From: Martin Holst Swende <martin@swende.se>
Date: Fri, 10 Jan 2020 10:12:32 +0100
Subject: [PATCH] core/state: add more verbosity to panic

---
 core/state/statedb.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/state/statedb.go b/core/state/statedb.go
index 03e118d11..085f2379f 100644
--- a/core/state/statedb.go
+++ b/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
 }
-- 
GitLab