lnrpc+rpcserver: add ConfirmationsUntilActive and ConfirmationHeight

Introduce ConfirmationsUntilActive and ConfirmationHeight in
PendingChannelsResponse_PendingChannel. ConfirmationsUntilActive indicates
the remaining confirmations needed for the channel to become active. If the
funding transaction is unconfirmed, ConfirmationsUntilActive defaults to the
total required confirmations (NumConfsRequired). ConfirmationHeight records
the block height at which the funding transaction was first confirmed; if
unconfirmed, it will be 0.

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
This commit is contained in:
Nishant Bansal committed 2025-09-11 18:27:14 +05:30
1 parent ede08a8883
commit 5fd42ac61d
4 files changed
+2091 -1981

No files matched your search

+19
View File
@@ -2848,6 +2848,25 @@ message PendingChannelsResponse {
// very likely canceled the funding and the channel will never become
// fully operational.
int32 funding_expiry_blocks = 3;
// The number of blocks remaining until the channel status changes from
// pending to active. A value of 0 indicates that the channel is now
// active.
//
// "Active" here means both channel peers have the channel marked OPEN
// and can immediately start using it. For public channels, this does
// not imply a channel_announcement has been gossiped. It only becomes
// public on the network after 6 on‐chain confirmations.
// See BOLT07 "Routing Gossip":
// https://github.com/lightning/bolts/blob/master/07-routing-gossip.md
//
// ZeroConf channels bypass the pending state entirely: they are marked
// active immediately upon creation, so they never show up as "pending".
uint32 confirmations_until_active = 7;
// The confirmation height records the block height at which the funding
// transaction was first confirmed.
uint32 confirmation_height = 8;
}
message WaitingCloseChannel {