Skip to content

Commit

Permalink
update test data
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoacosta74 committed Oct 2, 2024
1 parent cde804b commit f6415ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/types/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestUTXOTransactionEncode(t *testing.T) {
in := TxIn{
PreviousOutPoint: *NewOutPoint(&common.Hash{},
MaxOutputIndex),
PubKey: []byte{0x04, 0x50, 0x49, 0x5c, 0xb2, 0xf9, 0x53, 0x5c, 0x68, 0x4e, 0xbe, 0x46, 0x87, 0xb5, 0x01, 0xc0, 0xd4, 0x1a, 0x62, 0x3d, 0x68, 0xc1, 0x18, 0xb8, 0xdc, 0xec, 0xd3, 0x93, 0x37, 0x0f, 0x1d, 0x90, 0xe6, 0x5c, 0x4c, 0x6c, 0x44, 0xcd, 0x3f, 0xe8, 0x09, 0xb4, 0x1d, 0xfa, 0xc9, 0x06, 0x0a, 0xd8, 0x4c, 0xb5, 0x7e, 0x2d, 0x57, 0x5f, 0xad, 0x24, 0xd2, 0x5a, 0x7e, 0xfa, 0x33, 0x96, 0xe7, 0x3c, 0x10},
}

newOut := TxOut{
Expand Down Expand Up @@ -752,7 +753,7 @@ func qiTxData() (*Transaction, common.Hash) {
outpoint := NewOutPoint(&txHash, 1)
inner := &QiTx{
ChainID: new(big.Int).SetUint64(1),
TxIn: TxIns{*NewTxIn(outpoint, []byte{0x01}, [][]byte{{0x01}})},
TxIn: TxIns{*NewTxIn(outpoint, []byte{0x04, 0x50, 0x49, 0x5c, 0xb2, 0xf9, 0x53, 0x5c, 0x68, 0x4e, 0xbe, 0x46, 0x87, 0xb5, 0x01, 0xc0, 0xd4, 0x1a, 0x62, 0x3d, 0x68, 0xc1, 0x18, 0xb8, 0xdc, 0xec, 0xd3, 0x93, 0x37, 0x0f, 0x1d, 0x90, 0xe6, 0x5c, 0x4c, 0x6c, 0x44, 0xcd, 0x3f, 0xe8, 0x09, 0xb4, 0x1d, 0xfa, 0xc9, 0x06, 0x0a, 0xd8, 0x4c, 0xb5, 0x7e, 0x2d, 0x57, 0x5f, 0xad, 0x24, 0xd2, 0x5a, 0x7e, 0xfa, 0x33, 0x96, 0xe7, 0x3c, 0x10}, [][]byte{{0x01}})},
TxOut: TxOuts{*NewTxOut(1, []byte{0x2}, big.NewInt(1))},
ParentHash: &parentHash,
MixHash: &mixHash,
Expand All @@ -764,7 +765,7 @@ func qiTxData() (*Transaction, common.Hash) {

func TestQiTxHash(t *testing.T) {
_, hash := qiTxData()
correctHash := common.HexToHash("0x20f420e372c75c4a43555f02ae79b9c5edaeab288af2b0b8086150b3a9a3e3f0")
correctHash := common.HexToHash("0x20b720e4860b3db006d7a19fed6be3efe5619f53f499ef561f42c46bc12b555d")
require.Equal(t, hash, correctHash, "Hash not equal to expected hash")
}

Expand Down

0 comments on commit f6415ec

Please sign in to comment.