mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
core: add verbose output in the case of gas use error
This commit is contained in:
parent
0d9a8207d6
commit
6c2593f685
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
func (v *BlockValidator) ValidateState(block, parent *types.Block, statedb *state.StateDB, receipts types.Receipts, usedGas *big.Int) (err error) {
|
||||||
header := block.Header()
|
header := block.Header()
|
||||||
if block.GasUsed().Cmp(usedGas) != 0 {
|
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.
|
// Validate the received block's bloom with the one derived from the generated receipts.
|
||||||
// For valid blocks this should always validate to true.
|
// For valid blocks this should always validate to true.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue