coinset: Update for wire.NewMsgTx API change.
This commit is contained in:
parent
68e5965458
commit
aa9087a7ef
2 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue