Skip to content

Commit d4f25b4

Browse files
authored
tests: more verbosity if block decoding fails (#28814)
1 parent 566754c commit d4f25b4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/block_test_util.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
"github.com/ethereum/go-ethereum/core/state"
3737
"github.com/ethereum/go-ethereum/core/types"
3838
"github.com/ethereum/go-ethereum/core/vm"
39+
"github.com/ethereum/go-ethereum/log"
3940
"github.com/ethereum/go-ethereum/params"
4041
"github.com/ethereum/go-ethereum/rlp"
4142
"github.com/ethereum/go-ethereum/trie"
@@ -224,6 +225,7 @@ func (t *BlockTest) insertBlocks(blockchain *core.BlockChain) ([]btBlock, error)
224225
cb, err := b.decode()
225226
if err != nil {
226227
if b.BlockHeader == nil {
228+
log.Info("Block decoding failed", "index", bi, "err", err)
227229
continue // OK - block is supposed to be invalid, continue with next block
228230
} else {
229231
return nil, fmt.Errorf("block RLP decoding failed when expected to succeed: %v", err)

0 commit comments

Comments
 (0)