mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-21 22:11:41 +01:00
lnrpc+lncli: rename skip_peer_alias_lookup to reflect opt-in behavior
This commit is contained in:
parent
55d62f8bab
commit
46b8de35ac
5 changed files with 776 additions and 772 deletions
|
@ -1371,12 +1371,16 @@ func forwardingHistory(ctx *cli.Context) error {
|
|||
maxEvents = uint32(m)
|
||||
}
|
||||
|
||||
// By default we will look up the peers' alias information unless the
|
||||
// skip_peer_alias_lookup flag is specified.
|
||||
lookupPeerAlias := !ctx.Bool("skip_peer_alias_lookup")
|
||||
|
||||
req := &lnrpc.ForwardingHistoryRequest{
|
||||
StartTime: startTime,
|
||||
EndTime: endTime,
|
||||
IndexOffset: indexOffset,
|
||||
NumMaxEvents: maxEvents,
|
||||
SkipPeerAliasLookup: ctx.Bool("skip_peer_alias_lookup"),
|
||||
StartTime: startTime,
|
||||
EndTime: endTime,
|
||||
IndexOffset: indexOffset,
|
||||
NumMaxEvents: maxEvents,
|
||||
PeerAliasLookup: lookupPeerAlias,
|
||||
}
|
||||
resp, err := client.ForwardingHistory(ctxc, req)
|
||||
if err != nil {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4059,9 +4059,9 @@ message ForwardingHistoryRequest {
|
|||
// The max number of events to return in the response to this query.
|
||||
uint32 num_max_events = 4;
|
||||
|
||||
// Informs the server if the peer alias lookup per forwarding event
|
||||
// should be skipped in order to improve performance.
|
||||
bool skip_peer_alias_lookup = 5;
|
||||
// Informs the server if the peer alias should be looked up for each
|
||||
// forwarding event.
|
||||
bool peer_alias_lookup = 5;
|
||||
}
|
||||
message ForwardingEvent {
|
||||
// Timestamp is the time (unix epoch offset) that this circuit was
|
||||
|
|
|
@ -4496,9 +4496,9 @@
|
|||
"format": "int64",
|
||||
"description": "The max number of events to return in the response to this query."
|
||||
},
|
||||
"skip_peer_alias_lookup": {
|
||||
"peer_alias_lookup": {
|
||||
"type": "boolean",
|
||||
"description": "Informs the server if the peer alias lookup per forwarding event\nshould be skipped in order to improve performance."
|
||||
"description": "Informs the server if the peer alias should be looked up for each\nforwarding event."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -6892,7 +6892,7 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
|
|||
AmtOutMsat: uint64(amtOutMsat),
|
||||
}
|
||||
|
||||
if !req.SkipPeerAliasLookup {
|
||||
if req.PeerAliasLookup {
|
||||
aliasIn, err := getRemoteAlias(event.IncomingChanID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to lookup peer "+
|
||||
|
|
Loading…
Add table
Reference in a new issue