Skip to content

Commit

Permalink
test(types): update tx tests
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f committed Oct 8, 2024
1 parent 03627ce commit 71f9992
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion types/tx/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,16 @@ func TestTxIDNoSignatory(t *testing.T) {
tx1 := ts.GenerateTestTransferTx()
tx2 := new(tx.Tx)
*tx2 = *tx1

tx2.SetPublicKey(nil)
tx2.SetSignature(nil)

require.True(t, tx1.IsSigned())
require.False(t, tx2.IsSigned())

require.Equal(t, tx1.ID(), tx2.ID())
require.Equal(t, tx1.SignBytes(), tx2.SignBytes())

}

Check failure on line 91 in types/tx/tx_test.go

View workflow job for this annotation

GitHub Actions / build-linux

unnecessary trailing newline (whitespace)

Check failure on line 91 in types/tx/tx_test.go

View workflow job for this annotation

GitHub Actions / linting

unnecessary trailing newline (whitespace)

func TestBasicCheck(t *testing.T) {
Expand Down Expand Up @@ -196,7 +202,7 @@ func TestInvalidPayloadType(t *testing.T) {
ts := testsuite.NewTestSuite(t)

d := ts.DecodingHex(
"00" + // Flags
"02" + // Flags
"01" + // Version
"01020300" + // LockTime
"01" + // Fee
Expand Down

0 comments on commit 71f9992

Please sign in to comment.