[wallet] Set the correct nSequence when RBF and OP_CSV are used

This commit also fixes the timelock comparing logic in the policy module, since
the rules are different for absolute (OP_CLTV) and relative (OP_CSV) timelocks.

Fixes #215
This commit is contained in:
Alekos Filini
2020-12-07 14:48:17 +01:00
parent 7adaaf227c
commit 322122afc8
5 changed files with 136 additions and 20 deletions

View File

@@ -60,7 +60,7 @@ pub enum Error {
TransactionNotFound,
/// Happens when trying to bump a transaction that is already confirmed
TransactionConfirmed,
/// Trying to replace a tx that has a sequence = `0xFFFFFFFF`
/// Trying to replace a tx that has a sequence >= `0xFFFFFFFE`
IrreplaceableTransaction,
/// When bumping a tx the fee rate requested is lower than required
FeeRateTooLow {