bkpr: 'to_miner' spends are considered terminal
This is a rare case where we RBF the output of a penalty until it no longer has an output value we can reclaim. We ignore the txid for these events when closing a channel.
This commit is contained in:
parent
1dd52ba003
commit
83c6cf25d2
|
@ -386,6 +386,8 @@ bool find_txo_chain(const tal_t *ctx,
|
||||||
* might overlap txids */
|
* might overlap txids */
|
||||||
if (pr->spend
|
if (pr->spend
|
||||||
&& pr->spend->spending_txid
|
&& pr->spend->spending_txid
|
||||||
|
/* 'to_miner' outputs are skipped */
|
||||||
|
&& !streq(pr->spend->tag, "to_miner")
|
||||||
&& !txid_in_list(txids, pr->spend->spending_txid)
|
&& !txid_in_list(txids, pr->spend->spending_txid)
|
||||||
/* We dont trace utxos for non related accts */
|
/* We dont trace utxos for non related accts */
|
||||||
&& pr->spend->acct_db_id == acct->db_id) {
|
&& pr->spend->acct_db_id == acct->db_id) {
|
||||||
|
|
|
@ -1755,6 +1755,10 @@ def test_penalty_rbf_burn(node_factory, bitcoind, executor, chainparams):
|
||||||
|
|
||||||
check_utxos_channel(l2, [channel_id], expected_2)
|
check_utxos_channel(l2, [channel_id], expected_2)
|
||||||
|
|
||||||
|
# Make sure that l2's account is considered closed (has a fee output)
|
||||||
|
fees = [e for e in l2.rpc.listincome()['income_events'] if e['tag'] == 'onchain_fee']
|
||||||
|
assert len(fees) == 1
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.developer("needs DEVELOPER=1")
|
@pytest.mark.developer("needs DEVELOPER=1")
|
||||||
def test_onchain_first_commit(node_factory, bitcoind):
|
def test_onchain_first_commit(node_factory, bitcoind):
|
||||||
|
|
Loading…
Reference in New Issue