From edb006c11c5a25a8e2187435ef4ff61f0478442f Mon Sep 17 00:00:00 2001 From: Jonathan Gillham Date: Wed, 1 Oct 2014 13:57:27 +0100 Subject: [PATCH] Changed TxIn.PreviousOutpoint to TxIn.PreviousOutPoint after btcwire API change. --- internal_test.go | 4 ++-- opcode_test.go | 4 ++-- script_test.go | 48 ++++++++++++++++++++++++------------------------ 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/internal_test.go b/internal_test.go index f973879b..2bddf601 100644 --- a/internal_test.go +++ b/internal_test.go @@ -4019,7 +4019,7 @@ testloop: } for k, txin := range tx.MsgTx().TxIn { - pkScript, ok := prevOuts[txin.PreviousOutpoint] + pkScript, ok := prevOuts[txin.PreviousOutPoint] if !ok { t.Errorf("bad test (missing %dth input) %d:%v", k, i, test) @@ -4165,7 +4165,7 @@ testloop: } for k, txin := range tx.MsgTx().TxIn { - pkScript, ok := prevOuts[txin.PreviousOutpoint] + pkScript, ok := prevOuts[txin.PreviousOutPoint] if !ok { t.Errorf("bad test (missing %dth input) %d:%v", k, i, test) diff --git a/opcode_test.go b/opcode_test.go index d36b2b1d..0d95e571 100644 --- a/opcode_test.go +++ b/opcode_test.go @@ -484,7 +484,7 @@ func testScript(t *testing.T, script []byte, canonical bool) (err error) { Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash{}, Index: 0xffffffff, }, @@ -4267,7 +4267,7 @@ func testOpcode(t *testing.T, test *detailedTest) { Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash{}, Index: 0xffffffff, }, diff --git a/script_test.go b/script_test.go index 63c66314..5cddd495 100644 --- a/script_test.go +++ b/script_test.go @@ -129,7 +129,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0xc9, 0x97, 0xa5, 0xe5, 0x6e, 0x10, 0x41, 0x02, @@ -235,7 +235,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0xc9, 0x97, 0xa5, 0xe5, 0x6e, 0x10, 0x41, 0x02, @@ -341,7 +341,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0xc9, 0x97, 0xa5, 0xe5, 0x6e, 0x10, 0x41, 0x02, @@ -449,7 +449,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0xc9, 0x97, 0xa5, 0xe5, 0x6e, 0x10, 0x41, 0x02, @@ -558,7 +558,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x5f, 0x38, 0x6c, 0x8a, 0x38, 0x42, 0xc9, 0xa9, @@ -664,7 +664,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0xfe, 0x15, 0x62, 0xc4, 0x8b, 0x3a, 0xa6, 0x37, @@ -712,7 +712,7 @@ var txTests = []txTest{ Sequence: 4294967295, }, { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x2a, 0xc7, 0xee, 0xf8, 0xa9, 0x62, 0x2d, 0xda, @@ -838,7 +838,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0xf6, 0x04, 0x4c, 0x0a, 0xd4, 0x85, 0xf6, 0x33, @@ -880,7 +880,7 @@ var txTests = []txTest{ Sequence: 4294967295, }, { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x9c, 0x6a, 0xf0, 0xdf, 0x66, 0x69, 0xbc, 0xde, @@ -968,7 +968,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x37, 0xb1, 0x7d, 0x76, 0x38, 0x51, 0xcd, 0x1a, @@ -1006,7 +1006,7 @@ var txTests = []txTest{ Sequence: 4294967295, }, { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x37, 0xb1, 0x7d, 0x76, 0x38, 0x51, 0xcd, 0x1a, @@ -1091,7 +1091,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x37, 0xb1, 0x7d, 0x76, 0x38, 0x51, 0xcd, 0x1a, @@ -1129,7 +1129,7 @@ var txTests = []txTest{ Sequence: 4294967295, }, { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x37, 0xb1, 0x7d, 0x76, 0x38, 0x51, 0xcd, 0x1a, @@ -1217,7 +1217,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x37, 0xb1, 0x7d, 0x76, 0x38, 0x51, 0xcd, 0x1a, @@ -1277,7 +1277,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x6d, 0x58, 0xf8, 0xa3, 0xaa, 0x43, 0x0b, 0x84, @@ -1343,7 +1343,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x6d, 0x58, 0xf8, 0xa3, 0xaa, 0x43, 0x0b, 0x84, @@ -1408,7 +1408,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x6d, 0x58, 0xf8, 0xa3, 0xaa, 0x43, 0x0b, 0x84, @@ -1467,7 +1467,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x6d, 0x58, 0xf8, 0xa3, 0xaa, 0x43, 0x0b, 0x84, @@ -1531,7 +1531,7 @@ var txTests = []txTest{ Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0x6d, 0x58, 0xf8, 0xa3, 0xaa, 0x43, 0x0b, 0x84, @@ -2377,7 +2377,7 @@ func TestBadPC(t *testing.T) { Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0xc9, 0x97, 0xa5, 0xe5, 0x6e, 0x10, 0x41, 0x02, @@ -2436,7 +2436,7 @@ func TestCheckErrorCondition(t *testing.T) { Version: 1, TxIn: []*btcwire.TxIn{ { - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash([32]byte{ 0xc9, 0x97, 0xa5, 0xe5, 0x6e, 0x10, 0x41, 0x02, @@ -3327,21 +3327,21 @@ func TestSignTxOutput(t *testing.T) { Version: 1, TxIn: []*btcwire.TxIn{ &btcwire.TxIn{ - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash{}, Index: 0, }, Sequence: 4294967295, }, &btcwire.TxIn{ - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash{}, Index: 1, }, Sequence: 4294967295, }, &btcwire.TxIn{ - PreviousOutpoint: btcwire.OutPoint{ + PreviousOutPoint: btcwire.OutPoint{ Hash: btcwire.ShaHash{}, Index: 2, },