From aa9087a7efc961fbd253d4ae9c8b7a318749c273 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 26 Oct 2016 21:28:16 -0500 Subject: [PATCH] coinset: Update for wire.NewMsgTx API change. --- coinset/coins.go | 4 ++-- coinset/coins_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/coinset/coins.go b/coinset/coins.go index 17ee5ce..1d8f4a3 100644 --- a/coinset/coins.go +++ b/coinset/coins.go @@ -124,8 +124,8 @@ func (cs *CoinSet) removeElement(e *list.Element) Coin { // NewMsgTxWithInputCoins takes the coins in the CoinSet and makes them // the inputs to a new wire.MsgTx which is returned. -func NewMsgTxWithInputCoins(inputCoins Coins) *wire.MsgTx { - msgTx := wire.NewMsgTx() +func NewMsgTxWithInputCoins(txVersion int32, inputCoins Coins) *wire.MsgTx { + msgTx := wire.NewMsgTx(txVersion) coins := inputCoins.Coins() msgTx.TxIn = make([]*wire.TxIn, len(coins)) for i, coin := range coins { diff --git a/coinset/coins_test.go b/coinset/coins_test.go index 9d8aebd..56f095e 100644 --- a/coinset/coins_test.go +++ b/coinset/coins_test.go @@ -109,7 +109,7 @@ func TestCoinSet(t *testing.T) { t.Error("Expected first coin") } - mtx := coinset.NewMsgTxWithInputCoins(cs) + mtx := coinset.NewMsgTxWithInputCoins(wire.TxVersion, cs) if len(mtx.TxIn) != 1 { t.Errorf("Expected only 1 TxIn, got %d", len(mtx.TxIn)) }