diff --git a/rawtransactions.go b/rawtransactions.go index 3e178f4..d76a805 100644 --- a/rawtransactions.go +++ b/rawtransactions.go @@ -240,22 +240,22 @@ func (r FutureCreateRawTransactionResult) Receive() (*wire.MsgTx, error) { // // See CreateRawTransaction for the blocking version and more details. func (c *Client) CreateRawTransactionAsync(inputs []dcrjson.TransactionInput, - amounts map[dcrutil.Address]dcrutil.Amount) FutureCreateRawTransactionResult { + amounts map[dcrutil.Address]dcrutil.Amount, lockTime *int64) FutureCreateRawTransactionResult { convertedAmts := make(map[string]float64, len(amounts)) for addr, amount := range amounts { convertedAmts[addr.String()] = amount.ToCoin() } - cmd := dcrjson.NewCreateRawTransactionCmd(inputs, convertedAmts) + cmd := dcrjson.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 []dcrjson.TransactionInput, - amounts map[dcrutil.Address]dcrutil.Amount) (*wire.MsgTx, error) { + amounts map[dcrutil.Address]dcrutil.Amount, lockTime *int64) (*wire.MsgTx, error) { - return c.CreateRawTransactionAsync(inputs, amounts).Receive() + return c.CreateRawTransactionAsync(inputs, amounts, lockTime).Receive() } // FutureCreateRawSStxResult is a future promise to deliver the result