wallet: pass in fee-per-kb into CreateSimpleTx

This commit is contained in:
Olaoluwa Osuntokun 2017-11-23 16:10:39 -06:00
parent 1cbee7c506
commit b963eb3ba4

View file

@ -561,13 +561,14 @@ out:
// function is serialized to prevent the creation of many transactions which // function is serialized to prevent the creation of many transactions which
// spend the same outputs. // spend the same outputs.
func (w *Wallet) CreateSimpleTx(account uint32, outputs []*wire.TxOut, func (w *Wallet) CreateSimpleTx(account uint32, outputs []*wire.TxOut,
minconf int32) (*txauthor.AuthoredTx, error) { minconf int32, satPerKb btcutil.Amount) (*txauthor.AuthoredTx, error) {
req := createTxRequest{ req := createTxRequest{
account: account, account: account,
outputs: outputs, outputs: outputs,
minconf: minconf, minconf: minconf,
resp: make(chan createTxResponse), feeSatPerKB: satPerKb,
resp: make(chan createTxResponse),
} }
w.createTxRequests <- req w.createTxRequests <- req
resp := <-req.resp resp := <-req.resp
@ -2316,7 +2317,7 @@ func (w *Wallet) SendOutputs(outputs []*wire.TxOut, account uint32,
// Create transaction, replying with an error if the creation // Create transaction, replying with an error if the creation
// was not successful. // was not successful.
createdTx, err := w.CreateSimpleTx(account, outputs, minconf) createdTx, err := w.CreateSimpleTx(account, outputs, minconf, satPerKb)
if err != nil { if err != nil {
return nil, err return nil, err
} }