From 7f16649ca02562d1636ed7a91b2c411f6940f378 Mon Sep 17 00:00:00 2001 From: protolambda Date: Wed, 26 Jul 2023 14:52:13 -0600 Subject: [PATCH] snap: fix snap-tests to handle legacy code lookups --- cmd/devp2p/internal/ethtest/snap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/devp2p/internal/ethtest/snap.go b/cmd/devp2p/internal/ethtest/snap.go index f947e4bc9b..8fa03660cf 100644 --- a/cmd/devp2p/internal/ethtest/snap.go +++ b/cmd/devp2p/internal/ethtest/snap.go @@ -249,11 +249,11 @@ func (s *Suite) TestSnapGetByteCodes(t *utesting.T) { // A few stateroots { nBytes: 10000, hashes: []common.Hash{s.chain.RootAt(0), s.chain.RootAt(999)}, - expHashes: 0, + expHashes: 1, // 32-byte keys are detected as code, even if not code (like genesis hash), in legacy lookups. }, { nBytes: 10000, hashes: []common.Hash{s.chain.RootAt(0), s.chain.RootAt(0)}, - expHashes: 0, + expHashes: 2, // 32-byte keys are detected as code, even if not code (like genesis hash), in legacy lookups. }, // Empties {