Code wallet.dustValue() to use transactionpool.FeeEstimation
Currently the helper function dustValue()
is hardcoded to 1 SC. We should re-code it to use the transactionpool.FeeEstimation()
, and return the dust value equal to 3*minFee
. This means the dust threshold changes over time.
The tricky thing about this is that dustValue
calls out to another module, which means that it can't be called internally while the wallet is under lock. So it should probably be called managedDustValue
, even though it doesn't technically act upon a stateful object. If a stateful object uses that function, the result is the same, potential deadlock unless the locking is handled correctly.
The reviewer of the pull request to fix this issue needs to be careful to ensure that all uses of the dustValue
function have been updated to correctly deal with locking.