mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
coin_mvt: log channel_open for channels that close before they're locked
We don't push out a coin_move for a channel open until it's locked in, but this causes problems for channels that close before they're locked. So if we go the "close before locked in" route, we push out a channel open event. These will get a blockheight of 0, if we haven't seen the funding transaction in a block yet.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* saves and funding tx watching for a channel open */
|
||||
|
||||
#include "config.h"
|
||||
#include <bitcoin/short_channel_id.h>
|
||||
#include <ccan/array_size/array_size.h>
|
||||
#include <ccan/cast/cast.h>
|
||||
#include <ccan/mem/mem.h>
|
||||
@@ -1748,7 +1749,8 @@ static void handle_channel_locked(struct subd *dualopend,
|
||||
CHANNELD_NORMAL,
|
||||
REASON_UNKNOWN,
|
||||
"Lockin complete");
|
||||
channel_record_open(channel);
|
||||
channel_record_open(channel,
|
||||
short_channel_id_blocknum(channel->scid));
|
||||
|
||||
/* Empty out the inflights */
|
||||
wallet_channel_clear_inflights(dualopend->ld->wallet, channel);
|
||||
|
||||
Reference in New Issue
Block a user