Merge pull request #10352 from starius/chainnotifier-unavallable

chainrpc: return Unavailable while notifier starts
This commit is contained in:
Yong authored and GitHub committed 2025-11-13 23:27:52 +08:00
commit f6005ed350
2 files changed
+10 -3

No files matched your search

+6 -1
View File
@@ -59,6 +59,11 @@
- [Fixed a bug](https://github.com/lightningnetwork/lnd/pull/10330) to ensure that goroutine resources are properly freed in the case - [Fixed a bug](https://github.com/lightningnetwork/lnd/pull/10330) to ensure that goroutine resources are properly freed in the case
of a disconnection or other failure event. of a disconnection or other failure event.
- Chain notifier RPCs now [return the gRPC `Unavailable`
status](https://github.com/lightningnetwork/lnd/pull/10352) while the
sub-server is still starting. This allows clients to reliably detect the
transient condition and retry without brittle string matching.
# New Features # New Features
* Use persisted [nodeannouncement](https://github.com/lightningnetwork/lnd/pull/8825) * Use persisted [nodeannouncement](https://github.com/lightningnetwork/lnd/pull/8825)
@@ -283,7 +288,7 @@ reader of a payment request.
* [Require invoices to include a payment address or blinded paths](https://github.com/lightningnetwork/lnd/pull/9752) * [Require invoices to include a payment address or blinded paths](https://github.com/lightningnetwork/lnd/pull/9752)
to comply with updated BOLT 11 specifications before sending payments. to comply with updated BOLT 11 specifications before sending payments.
* [LND can now recgonize DNS address type in node * [LND can now recognize DNS address type in node
announcement msg](https://github.com/lightningnetwork/lnd/pull/9455). This announcement msg](https://github.com/lightningnetwork/lnd/pull/9455). This
allows users to forward node announcement with valid DNS address types. The allows users to forward node announcement with valid DNS address types. The
validity aligns with Bolt 07 DNS constraints. validity aligns with Bolt 07 DNS constraints.
+4 -2
View File
@@ -18,6 +18,8 @@ import (
"github.com/lightningnetwork/lnd/lnrpc" "github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/macaroons" "github.com/lightningnetwork/lnd/macaroons"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"gopkg.in/macaroon-bakery.v2/bakery" "gopkg.in/macaroon-bakery.v2/bakery"
) )
@@ -84,8 +86,8 @@ var (
// ErrChainNotifierServerNotActive indicates that the chain notifier hasn't // ErrChainNotifierServerNotActive indicates that the chain notifier hasn't
// finished the startup process. // finished the startup process.
ErrChainNotifierServerNotActive = errors.New("chain notifier RPC is " + ErrChainNotifierServerNotActive = status.Error(codes.Unavailable,
"still in the process of starting") "chain notifier RPC is still in the process of starting")
) )
// ServerShell is a shell struct holding a reference to the actual sub-server. // ServerShell is a shell struct holding a reference to the actual sub-server.