浏览代码

core/state: add more verbosity to panic

Martin Holst Swende 5 年之前
父节点
当前提交
fc392395fb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/state/statedb.go

+ 1 - 1
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
 }