From 90eb4f1939f7b0389d5784b889cc0e5d2b3451f7 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 4 Jul 2014 15:32:10 +0200 Subject: Debug output, minor fixes and tweaks * Script compile length fix * Transition fix --- ethchain/state_manager.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'ethchain/state_manager.go') diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go index cec424583..f3fd92913 100644 --- a/ethchain/state_manager.go +++ b/ethchain/state_manager.go @@ -181,11 +181,24 @@ func (sm *StateManager) Process(block *Block, dontReact bool) (err error) { if err != nil { if len(receipts) == len(block.Receipts()) { for i, receipt := range block.Receipts() { - statelogger.Debugf("diff (r) %v ~ %x <=> (c) %v ~ %x (%x)\n", receipt.CumulativeGasUsed, receipt.PostState[0:4], receipts[i].CumulativeGasUsed, receipts[i].PostState[0:4], receipt.Tx.Hash()) + statelogger.Infof("diff (r) %v ~ %x <=> (c) %v ~ %x (%x)\n", receipt.CumulativeGasUsed, receipt.PostState[0:4], receipts[i].CumulativeGasUsed, receipts[i].PostState[0:4], receipt.Tx.Hash()) } } else { statelogger.Warnln("Unable to print receipt diff. Length didn't match", len(receipts), "for", len(block.Receipts())) } + } else { + /* + for i, receipt := range receipts { + gu := new(big.Int) + if i != 0 { + gu.Sub(receipt.CumulativeGasUsed, receipts[i-1].CumulativeGasUsed) + } else { + gu.Set(receipt.CumulativeGasUsed) + } + + statelogger.Infof("[r] %v ~ %x (%x)\n", gu, receipt.PostState[0:4], receipt.Tx.Hash()) + } + */ } }() -- cgit v1.2.3