wallet: use relay fee to check for dust not fee rate
In this commit we fix a lingering bug in our output sanity checks that would only show up during time periods of persistently higher fees. Before this commit we would incorrectly use the fee rate instead of the min relay fee when checking an output for dust. This would cause us to mistakenly reject a transaction for having a dust output. We fix this by falling back to using the current min-relayfee.
This commit is contained in:
parent
89ab2044f9
commit
1dccdec1c1
1 changed files with 4 additions and 1 deletions
|
@ -3172,7 +3172,10 @@ func (w *Wallet) SendOutputs(outputs []*wire.TxOut, account uint32,
|
||||||
// Ensure the outputs to be created adhere to the network's consensus
|
// Ensure the outputs to be created adhere to the network's consensus
|
||||||
// rules.
|
// rules.
|
||||||
for _, output := range outputs {
|
for _, output := range outputs {
|
||||||
if err := txrules.CheckOutput(output, satPerKb); err != nil {
|
err := txrules.CheckOutput(
|
||||||
|
output, txrules.DefaultRelayFeePerKb,
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue