Move RBF-bump to start of update_claims_view to avoid double-bump 2021-07-no-instant-rbf
authorMatt Corallo <git@bluematt.me>
Fri, 2 Jul 2021 00:13:13 +0000 (00:13 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 2 Jul 2021 17:55:47 +0000 (17:55 +0000)
commit7b161f7b0feb0fbe7d6465eb1d705c5b1bddf554
tree1a09af6469ffa4869b0dad28cd52b7b08e83b3f1
parent0c57018f2fb5618f976542a4d24adee29cf49c96
Move RBF-bump to start of update_claims_view to avoid double-bump

`OnchainTx::update_claims_view` currently checks if there are
packages which need to be RBF-bumped first, prior to adding new
packages to the tracking map. This can, in some cases, cause us to
RBF-bump a package which we only just added, at least in cases
where we're skipping blocks being connected.

Here we simply move the RBF-bump check to the top of
`OnchainTx::update_claims_view`, avoiding any such cases (though
there are still some cases where we may call
`OnchainTx::update_claims_view` twice for the same block, which is
resolved separately).
lightning/src/chain/onchaintx.rs