mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-12 22:19:06 +02:00
Merge pull request #7471 from hieblmi/peer-alias-remove-error
rpc: assign peer alias lookup error string
This commit is contained in:
commit
2e9ceb2ceb
@ -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
|
||||
`--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
|
||||
|
||||
* [Allows Taproot public keys and tap scripts to be imported as watch-only
|
||||
|
17
rpcserver.go
17
rpcserver.go
@ -4176,8 +4176,8 @@ func createRPCOpenChannel(r *rpcServer, dbChannel *channeldb.OpenChannel,
|
||||
if peerAliasLookup {
|
||||
peerAlias, err := r.server.graphDB.LookupAlias(nodePub)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to lookup peer "+
|
||||
"alias: %w", err)
|
||||
peerAlias = fmt.Sprintf("unable to lookup "+
|
||||
"peer alias: %v", err)
|
||||
}
|
||||
channel.PeerAlias = peerAlias
|
||||
}
|
||||
@ -7018,16 +7018,15 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
|
||||
if req.PeerAliasLookup {
|
||||
aliasIn, err := getRemoteAlias(event.IncomingChanID)
|
||||
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)
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user