diff --git a/rawtransactions.go b/rawtransactions.go index 5ea45e90..aa24f61d 100644 --- a/rawtransactions.go +++ b/rawtransactions.go @@ -238,22 +238,22 @@ func (r FutureCreateRawTransactionResult) Receive() (*wire.MsgTx, error) { // // See CreateRawTransaction for the blocking version and more details. func (c *Client) CreateRawTransactionAsync(inputs []btcjson.TransactionInput, - amounts map[btcutil.Address]btcutil.Amount) FutureCreateRawTransactionResult { + amounts map[btcutil.Address]btcutil.Amount, lockTime *int64) FutureCreateRawTransactionResult { convertedAmts := make(map[string]float64, len(amounts)) for addr, amount := range amounts { convertedAmts[addr.String()] = amount.ToBTC() } - cmd := btcjson.NewCreateRawTransactionCmd(inputs, convertedAmts) + cmd := btcjson.NewCreateRawTransactionCmd(inputs, convertedAmts, lockTime) return c.sendCmd(cmd) } // CreateRawTransaction returns a new transaction spending the provided inputs // and sending to the provided addresses. func (c *Client) CreateRawTransaction(inputs []btcjson.TransactionInput, - amounts map[btcutil.Address]btcutil.Amount) (*wire.MsgTx, error) { + amounts map[btcutil.Address]btcutil.Amount, lockTime *int64) (*wire.MsgTx, error) { - return c.CreateRawTransactionAsync(inputs, amounts).Receive() + return c.CreateRawTransactionAsync(inputs, amounts, lockTime).Receive() } // FutureSendRawTransactionResult is a future promise to deliver the result