core/types: fix unhandled errors in TestTransactionCoding (#24692)

This commit is contained in:
tia-99 2022-04-27 16:56:50 +08:00 committed by GitHub
parent 16701c5169
commit 1f5943e4f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -477,14 +477,18 @@ func TestTransactionCoding(t *testing.T) {
if err != nil {
t.Fatal(err)
}
assertEqual(parsedTx, tx)
if err := assertEqual(parsedTx, tx); err != nil {
t.Fatal(err)
}
// JSON
parsedTx, err = encodeDecodeJSON(tx)
if err != nil {
t.Fatal(err)
}
assertEqual(parsedTx, tx)
if err := assertEqual(parsedTx, tx); err != nil {
t.Fatal(err)
}
}
}