diff options
Diffstat (limited to 'dex/app_test.go')
-rw-r--r-- | dex/app_test.go | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/dex/app_test.go b/dex/app_test.go index 7d665a0af..34b31d3d3 100644 --- a/dex/app_test.go +++ b/dex/app_test.go @@ -119,18 +119,14 @@ func TestPrepareWitness(t *testing.T) { t.Fatalf("unexpeted witness height %v", witness.Height) } - var witnessData types.WitnessData - err = rlp.DecodeBytes(witness.Data, &witnessData) + var witnessBlockHash common.Hash + err = rlp.DecodeBytes(witness.Data, &witnessBlockHash) if err != nil { t.Fatalf("rlp decode error: %v", err) } - if witnessData.Root != currentBlock.Root() { - t.Fatalf("expect root %v but %v", currentBlock.Root(), witnessData.Root) - } - - if witnessData.ReceiptHash != currentBlock.ReceiptHash() { - t.Fatalf("expect receipt hash %v but %v", currentBlock.ReceiptHash(), witnessData.ReceiptHash) + if witnessBlockHash != currentBlock.Hash() { + t.Fatalf("expect root %v but %v", currentBlock.Hash(), witnessBlockHash) } if _, err := dex.app.PrepareWitness(999); err == nil { |