Merge pull request #7471 from hieblmi/peer-alias-remove-error
rpc: assign peer alias lookup error string
This commit is contained in:
2 files changed
+12
-9
No files matched your search
@@ -149,6 +149,10 @@ of order is also [fixed](https://github.com/lightningnetwork/lnd/pull/7264).
|
|||||||
parameter is enabled by default but can be disabled with a new flag
|
parameter is enabled by default but can be disabled with a new flag
|
||||||
`--skip_peer_alias_lookup`.
|
`--skip_peer_alias_lookup`.
|
||||||
|
|
||||||
|
* Assign potential peer alias lookup errors in the [`ListChannels` and
|
||||||
|
`ForwardingHistory`rpcs](https://github.com/lightningnetwork/lnd/pull/7471) to
|
||||||
|
the rpc response.
|
||||||
|
|
||||||
## Wallet
|
## Wallet
|
||||||
|
|
||||||
* [Allows Taproot public keys and tap scripts to be imported as watch-only
|
* [Allows Taproot public keys and tap scripts to be imported as watch-only
|
||||||
|
|||||||
+8
-9
@@ -4176,8 +4176,8 @@ func createRPCOpenChannel(r *rpcServer, dbChannel *channeldb.OpenChannel,
|
|||||||
if peerAliasLookup {
|
if peerAliasLookup {
|
||||||
peerAlias, err := r.server.graphDB.LookupAlias(nodePub)
|
peerAlias, err := r.server.graphDB.LookupAlias(nodePub)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to lookup peer "+
|
peerAlias = fmt.Sprintf("unable to lookup "+
|
||||||
"alias: %w", err)
|
"peer alias: %v", err)
|
||||||
}
|
}
|
||||||
channel.PeerAlias = peerAlias
|
channel.PeerAlias = peerAlias
|
||||||
}
|
}
|
||||||
@@ -7018,16 +7018,15 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
|
|||||||
if req.PeerAliasLookup {
|
if req.PeerAliasLookup {
|
||||||
aliasIn, err := getRemoteAlias(event.IncomingChanID)
|
aliasIn, err := getRemoteAlias(event.IncomingChanID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to lookup peer "+
|
aliasIn = fmt.Sprintf("unable to lookup peer "+
|
||||||
|
"alias: %v", err)
|
||||||
|
}
|
||||||
|
aliasOut, err := getRemoteAlias(event.OutgoingChanID)
|
||||||
|
if err != nil {
|
||||||
|
aliasOut = fmt.Sprintf("unable to lookup peer"+
|
||||||
"alias: %v", err)
|
"alias: %v", err)
|
||||||
}
|
}
|
||||||
resp.ForwardingEvents[i].PeerAliasIn = aliasIn
|
resp.ForwardingEvents[i].PeerAliasIn = aliasIn
|
||||||
|
|
||||||
aliasOut, err := getRemoteAlias(event.OutgoingChanID)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("unable to lookup peer "+
|
|
||||||
"alias: %v", err)
|
|
||||||
}
|
|
||||||
resp.ForwardingEvents[i].PeerAliasOut = aliasOut
|
resp.ForwardingEvents[i].PeerAliasOut = aliasOut
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user