mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-15 17:30:44 +00:00
eth/protocols/eth: use Derivable in test
This commit is contained in:
parent
ca0c5b9d72
commit
b47dda08a9
1 changed files with 1 additions and 4 deletions
|
|
@ -128,10 +128,7 @@ func TestReceiptList(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// compute root hash from ReceiptList and compare.
|
// compute root hash from ReceiptList and compare.
|
||||||
var bloomBuf [6]byte
|
responseHash := types.DeriveSha(rl.Derivable(), trie.NewStackTrie(nil))
|
||||||
writeReceipt := writeReceiptForHash(&bloomBuf)
|
|
||||||
receipts := newDerivableRawList(&rl.items, writeReceipt)
|
|
||||||
responseHash := types.DeriveSha(receipts, trie.NewStackTrie(nil))
|
|
||||||
if responseHash != test.root {
|
if responseHash != test.root {
|
||||||
t.Fatalf("test[%d]: wrong root hash from ReceiptList\nhave: %v\nwant: %v", i, responseHash, test.root)
|
t.Fatalf("test[%d]: wrong root hash from ReceiptList\nhave: %v\nwant: %v", i, responseHash, test.root)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue