From 6c2593f685626a245dfbeb3c065229ba9558863e Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Sat, 19 Nov 2016 21:06:32 +0100 Subject: [PATCH] core: add verbose output in the case of gas use error --- core/block_validator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/block_validator.go b/core/block_validator.go index 3353683c07..9b5b7469d8 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -113,7 +113,7 @@ func (v *BlockValidator) ValidateBlock(block *types.Block) error { func (v *BlockValidator) ValidateState(block, parent *types.Block, statedb *state.StateDB, receipts types.Receipts, usedGas *big.Int) (err error) { header := block.Header() if block.GasUsed().Cmp(usedGas) != 0 { - return ValidationError(fmt.Sprintf("gas used error (%v / %v)", block.GasUsed(), usedGas)) + return ValidationError(fmt.Sprintf("gas used error (%v / %v : %v)", block.GasUsed(), usedGas, receipts)) } // Validate the received block's bloom with the one derived from the generated receipts. // For valid blocks this should always validate to true.