Set anti-fee-sniping nLockTime in payjoin-cli#1678
Conversation
Coverage Report for CI Build 28193013536Coverage increased (+0.04%) to 85.555%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
The cli uses We either need to change this upstream in their library or re-implement this behavior to follow core ourselves. |
|
thanks everyone. reworked to fund via Core's depends on alpenlabs/bitcoind-async-client#126 I'll leave as a draft (CI red) until that releases, then I'll bump the dep. |
|
I would encourage you to just pin the
|
|
The core issue I opened bitcoin/bitcoin#34987 received mixed feedback as other people seemed to believe that this was the desired behavior as to leave locktime default creation up to us when using |
|
thanks @benalleng so, given the Core feedback, I lean to switch this to re-implement, since the caller should own the locktime for non-final tx creation (same as Liana) compute the anti-fee-sniping locktime (current tip, ~10% backdated ≤100, 0 on stale/IBD) and set it explicitly on sounds good? |
| InputPair::new(txin, psbtin, None).expect("Input pair should be valid") | ||
| } | ||
|
|
||
| /// nLockTime mirroring Core's `DiscourageFeeSniping`/`IsCurrentForAntiFeeSniping`: the tip, |
There was a problem hiding this comment.
Adding these to just give myself some better reference for review
compute the anti-fee-sniping
nLockTimein the cli (current tip, ~10% backdated up to 100, 0 on stale/IBD) and set it explicitly onwallet_create_funded_psbt, mirroring Core'sDiscourageFeeSnipingpayjoin-clinLockTimethen matchesCore/Electrumanonymity set.part of #1676 and #1597