Skip to content

Commit

Permalink
test(core/btc): add test case for ExtractPSBTPacketToMsgTx
Browse files Browse the repository at this point in the history
  • Loading branch information
Gkirito committed Jul 24, 2023
1 parent 7332c97 commit def7762
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/btc/transaction_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package btc

import (
"github.com/stretchr/testify/require"
"testing"
)

func TestExtractPSBTHexToMsgTx(t *testing.T) {
tx := "70736274ff01007d01000000011a2387d841d5bc6478565da39a77593f32bfd4de4771b85c019dd9b155e61ec50100000000fdffffff0295040000000000002251209c2ff5eab7f5689ffeab8a199cdafe6f3d5e5f06d40ad1bf4cab54938629f9a4d970040000000000160014ca1ebc2823e9c38ff36084c1320b751ba7b656c6000000000001011f0479040000000000160014ca1ebc2823e9c38ff36084c1320b751ba7b656c6220203772da2fda340de5e187408332d7df123607b6e4d1e2ebd16c466b59f934208664730440220284956a2deffde52f69b1ad67f2c80f3c87fc09f5bf5ca3dd5b915249317847502204c766ddb4f6cc9f9d3f18b4038b8667b47d43afdcc0dc9e332518edc4cac898801000000"
msgTx, err := ExtractPSBTHexToMsgTx(tx)
require.NoError(t, err)
t.Log(msgTx.TxHash().String())
}

0 comments on commit def7762

Please sign in to comment.