Skip to content

Commit

Permalink
core: better printout of receipts in bad block reports (#18156)
Browse files Browse the repository at this point in the history
* core/blockchain: better printout of receipts in bad block reports

* fix splleing
  • Loading branch information
holiman authored and karalabe committed Nov 22, 2018
1 parent 070caec commit e0d091e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1469,8 +1469,10 @@ func (bc *BlockChain) reportBlock(block *types.Block, receipts types.Receipts, e
bc.addBadBlock(block)

var receiptString string
for _, receipt := range receipts {
receiptString += fmt.Sprintf("\t%v\n", receipt)
for i, receipt := range receipts {
receiptString += fmt.Sprintf("\t %d: cumulative: %v gas: %v contract: %v status: %v tx: %v logs: %v bloom: %x state: %x\n",
i, receipt.CumulativeGasUsed, receipt.GasUsed, receipt.ContractAddress.Hex(),
receipt.Status, receipt.TxHash.Hex(), receipt.Logs, receipt.Bloom, receipt.PostState)
}
log.Error(fmt.Sprintf(`
########## BAD BLOCK #########
Expand Down

0 comments on commit e0d091e

Please sign in to comment.