Changed TxIn.PreviousOutpoint to TxIn.PreviousOutPoint after btcwire API change.

This commit is contained in:
Jonathan Gillham 2014-10-01 13:54:42 +01:00
parent ea27722dac
commit a5298a643e
4 changed files with 7 additions and 7 deletions

View file

@ -327,7 +327,7 @@ var Block100000 = btcwire.MsgBlock{
Version: 1,
TxIn: []*btcwire.TxIn{
{
PreviousOutpoint: btcwire.OutPoint{
PreviousOutPoint: btcwire.OutPoint{
Hash: btcwire.ShaHash{},
Index: 0xffffffff,
},
@ -361,7 +361,7 @@ var Block100000 = btcwire.MsgBlock{
Version: 1,
TxIn: []*btcwire.TxIn{
{
PreviousOutpoint: btcwire.OutPoint{
PreviousOutPoint: btcwire.OutPoint{
Hash: btcwire.ShaHash([32]byte{ // Make go vet happy.
0x03, 0x2e, 0x38, 0xe9, 0xc0, 0xa8, 0x4c, 0x60,
0x46, 0xd6, 0x87, 0xd1, 0x05, 0x56, 0xdc, 0xac,
@ -430,7 +430,7 @@ var Block100000 = btcwire.MsgBlock{
Version: 1,
TxIn: []*btcwire.TxIn{
{
PreviousOutpoint: btcwire.OutPoint{
PreviousOutPoint: btcwire.OutPoint{
Hash: btcwire.ShaHash([32]byte{ // Make go vet happy.
0xc3, 0x3e, 0xbf, 0xf2, 0xa7, 0x09, 0xf1, 0x3d,
0x9f, 0x9a, 0x75, 0x69, 0xab, 0x16, 0xa3, 0x27,
@ -498,7 +498,7 @@ var Block100000 = btcwire.MsgBlock{
Version: 1,
TxIn: []*btcwire.TxIn{
{
PreviousOutpoint: btcwire.OutPoint{
PreviousOutPoint: btcwire.OutPoint{
Hash: btcwire.ShaHash([32]byte{ // Make go vet happy.
0x0b, 0x60, 0x72, 0xb3, 0x86, 0xd4, 0xa7, 0x73,
0x23, 0x52, 0x37, 0xf6, 0x4c, 0x11, 0x26, 0xac,

View file

@ -310,7 +310,7 @@ func (bf *Filter) matchTxAndUpdate(tx *btcutil.Tx) bool {
// Check if the filter matches any outpoints this transaction spends or
// any any data elements in the signature scripts of any of the inputs.
for _, txin := range tx.MsgTx().TxIn {
if bf.matchesOutPoint(&txin.PreviousOutpoint) {
if bf.matchesOutPoint(&txin.PreviousOutPoint) {
return true
}

View file

@ -125,7 +125,7 @@ func NewMsgTxWithInputCoins(inputCoins Coins) *btcwire.MsgTx {
msgTx.TxIn = make([]*btcwire.TxIn, len(coins))
for i, coin := range coins {
msgTx.TxIn[i] = &btcwire.TxIn{
PreviousOutpoint: btcwire.OutPoint{
PreviousOutPoint: btcwire.OutPoint{
Hash: *coin.Hash(),
Index: coin.Index(),
},

View file

@ -109,7 +109,7 @@ func TestCoinSet(t *testing.T) {
if len(mtx.TxIn) != 1 {
t.Errorf("Expected only 1 TxIn, got %d", len(mtx.TxIn))
}
op := mtx.TxIn[0].PreviousOutpoint
op := mtx.TxIn[0].PreviousOutPoint
if !op.Hash.IsEqual(coins[1].Hash()) || op.Index != coins[1].Index() {
t.Errorf("Expected the second coin to be added as input to mtx")
}