@@ -683,12 +683,12 @@ func TestFastVsFullChains(t *testing.T) {
683683 }
684684 if fblock , arblock , anblock := fast .GetBlockByHash (hash ), archive .GetBlockByHash (hash ), ancient .GetBlockByHash (hash ); fblock .Hash () != arblock .Hash () || anblock .Hash () != arblock .Hash () {
685685 t .Errorf ("block #%d [%x]: block mismatch: fastdb %v, ancientdb %v, archivedb %v" , num , hash , fblock , anblock , arblock )
686- } else if types .DeriveSha (fblock .Transactions (), new ( trie.Trie )) != types .DeriveSha (arblock .Transactions (), new ( trie.Trie )) || types .DeriveSha (anblock .Transactions (), new ( trie.Trie )) != types .DeriveSha (arblock .Transactions (), new ( trie.Trie )) {
686+ } else if types .DeriveSha (fblock .Transactions (), trie .NewStackTrie ( nil )) != types .DeriveSha (arblock .Transactions (), trie .NewStackTrie ( nil )) || types .DeriveSha (anblock .Transactions (), trie .NewStackTrie ( nil )) != types .DeriveSha (arblock .Transactions (), trie .NewStackTrie ( nil )) {
687687 t .Errorf ("block #%d [%x]: transactions mismatch: fastdb %v, ancientdb %v, archivedb %v" , num , hash , fblock .Transactions (), anblock .Transactions (), arblock .Transactions ())
688688 } else if types .CalcUncleHash (fblock .Uncles ()) != types .CalcUncleHash (arblock .Uncles ()) || types .CalcUncleHash (anblock .Uncles ()) != types .CalcUncleHash (arblock .Uncles ()) {
689689 t .Errorf ("block #%d [%x]: uncles mismatch: fastdb %v, ancientdb %v, archivedb %v" , num , hash , fblock .Uncles (), anblock , arblock .Uncles ())
690690 }
691- if freceipts , anreceipts , areceipts := rawdb .ReadReceipts (fastDb , hash , * rawdb .ReadHeaderNumber (fastDb , hash ), fast .Config ()), rawdb .ReadReceipts (ancientDb , hash , * rawdb .ReadHeaderNumber (ancientDb , hash ), fast .Config ()), rawdb .ReadReceipts (archiveDb , hash , * rawdb .ReadHeaderNumber (archiveDb , hash ), fast .Config ()); types .DeriveSha (freceipts , new ( trie.Trie )) != types .DeriveSha (areceipts , new ( trie.Trie )) {
691+ if freceipts , anreceipts , areceipts := rawdb .ReadReceipts (fastDb , hash , * rawdb .ReadHeaderNumber (fastDb , hash ), fast .Config ()), rawdb .ReadReceipts (ancientDb , hash , * rawdb .ReadHeaderNumber (ancientDb , hash ), fast .Config ()), rawdb .ReadReceipts (archiveDb , hash , * rawdb .ReadHeaderNumber (archiveDb , hash ), fast .Config ()); types .DeriveSha (freceipts , trie .NewStackTrie ( nil )) != types .DeriveSha (areceipts , trie .NewStackTrie ( nil )) {
692692 t .Errorf ("block #%d [%x]: receipts mismatch: fastdb %v, ancientdb %v, archivedb %v" , num , hash , freceipts , anreceipts , areceipts )
693693 }
694694 }
0 commit comments