Closed benthecarman closed 2 years ago
Looks like this is the culprit: https://github.com/btcsuite/btcwallet/blob/5aafe47898507963ae099739e33ff5be9e5620c3/wallet/txauthor/author.go#L111-L125
We then end up using a default size for p2pkh, which is smaller than p2tr.
I think fee estimation within the main daemon (so the sweeper, and funding inputs, etc) should be correct however.
I think fee estimation within the main daemon (so the sweeper, and funding inputs, etc) should be correct however.
Yeah, I did a code sweep and searched for all occurrences of fee estimation. But it looks like I missed some code in btcwallet
.
Any blockers on this? I've had a fix for the underlying issue open for ~2 weeks now
Background
I am calling
SendOuputs
withsatPerKw = 1000
and it creates a tx with a weight of568
but fees of932
.This seems like it only happens with taproot inputs
Your environment
lnd
0.15.1Steps to reproduce
scala code of my test case:
Expected behaviour
correctly estimate fee
Actual behaviour
fee is off by a large margin