htlcswitch: skip checking replays for reforwarded packets

We now rely on the forwarding package's state to decide whether a given
packet is a reforwarding or not. If we know it's a reforwarding packet,
there's no need to check for replays in the `sharedHashes` bucket, which
behaves the same as if we are querying the `batchReplayBkt`.
This commit is contained in:
yyforyongyu
2025-06-11 12:16:09 +08:00
parent a5c4a7c547
commit fb95458a1b
3 changed files with 19 additions and 15 deletions

View File

@@ -522,7 +522,7 @@ func (p *mockIteratorDecoder) DecodeHopIterator(r io.Reader, rHash []byte,
}
func (p *mockIteratorDecoder) DecodeHopIterators(id []byte,
reqs []hop.DecodeHopIteratorRequest) (
reqs []hop.DecodeHopIteratorRequest, _ bool) (
[]hop.DecodeHopIteratorResponse, error) {
idHash := sha256.Sum256(id)