@@ -654,12 +654,12 @@ func TestFastVsFullChains(t *testing.T) {
654654 }
655655 if fblock , ablock := fast .GetBlockByHash (hash ), archive .GetBlockByHash (hash ); fblock .Hash () != ablock .Hash () {
656656 t .Errorf ("block #%d [%x]: block mismatch: have %v, want %v" , num , hash , fblock , ablock )
657- } else if types .DeriveSha (fblock .Transactions (), new ( trie.Trie )) != types .DeriveSha (ablock .Transactions (), new ( trie.Trie )) {
657+ } else if types .DeriveSha (fblock .Transactions (), trie .NewStackTrie ( nil )) != types .DeriveSha (ablock .Transactions (), trie .NewStackTrie ( nil )) {
658658 t .Errorf ("block #%d [%x]: transactions mismatch: have %v, want %v" , num , hash , fblock .Transactions (), ablock .Transactions ())
659659 } else if types .CalcUncleHash (fblock .Uncles ()) != types .CalcUncleHash (ablock .Uncles ()) {
660660 t .Errorf ("block #%d [%x]: uncles mismatch: have %v, want %v" , num , hash , fblock .Uncles (), ablock .Uncles ())
661661 }
662- if freceipts , areceipts := rawdb .ReadReceipts (fastDb , hash , * rawdb .ReadHeaderNumber (fastDb , 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 )) {
662+ if freceipts , areceipts := rawdb .ReadReceipts (fastDb , hash , * rawdb .ReadHeaderNumber (fastDb , 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 )) {
663663 t .Errorf ("block #%d [%x]: receipts mismatch: have %v, want %v" , num , hash , freceipts , areceipts )
664664 }
665665 }
0 commit comments