Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -8240,6 +8240,11 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
numEvents = 100
}

// Cap at the maximum number of events as documented in the API.
if numEvents > channeldb.MaxResponseEvents {
numEvents = channeldb.MaxResponseEvents
}

// Create sets of incoming and outgoing channel IDs from the request
// for faster lookups for filtering.
incomingChanIDs := fn.NewSet(req.IncomingChanIds...)
Expand Down