core/tests: make verityTx test more verbose

This commit is contained in:
Evgenii Stratonikov 2020-08-19 16:19:58 +03:00
parent e5813ae8cd
commit e0104679b5

View file

@ -2,7 +2,6 @@ package core
import ( import (
"errors" "errors"
"fmt"
"math/big" "math/big"
"math/rand" "math/rand"
"testing" "testing"
@ -252,8 +251,7 @@ func TestVerifyTx(t *testing.T) {
checkErr := func(t *testing.T, expectedErr error, tx *transaction.Transaction) { checkErr := func(t *testing.T, expectedErr error, tx *transaction.Transaction) {
err := bc.VerifyTx(tx) err := bc.VerifyTx(tx)
fmt.Println(err) require.True(t, errors.Is(err, expectedErr), "expected: %v, got: %v", expectedErr, err)
require.True(t, errors.Is(err, expectedErr))
} }
testScript := []byte{byte(opcode.PUSH1)} testScript := []byte{byte(opcode.PUSH1)}