lightningd: Add RPC for populating DB with stub channels and set an error on reconnecting

This commit is contained in:
adi2011
2022-06-24 06:44:11 +05:30
committed by neil saitug
parent 286d6c3165
commit 6ba8abb0de
6 changed files with 253 additions and 7 deletions

View File

@@ -669,8 +669,17 @@ enum watch_result onchaind_funding_spent(struct channel *channel,
channel->final_key_idx);
return KEEP_WATCHING;
}
/* This could be a mutual close, but it doesn't matter. */
bitcoin_txid(channel->last_tx, &our_last_txid);
/* This could be a mutual close, but it doesn't matter.
* We don't need this for stub channels as well */
if (!is_stub_scid(channel->scid))
bitcoin_txid(channel->last_tx, &our_last_txid);
else
/* Dummy txid for stub channel to make valgrind happy. */
bitcoin_txid_from_hex("80cea306607b708a03a1854520729d"
"a884e4317b7b51f3d4a622f88176f5e034",
64,
&our_last_txid);
/* We try to get the feerate for each transaction type, 0 if estimation
* failed. */