lnd/htlcswitch/hop
yyforyongyu e3f95dcd09
htlcswitch: remove batchReplayBkt
This commit removes the `batchReplayBkt` as its only effect is to allow
reforwarding htlcs during startup.

Normally for every incoming htlc added, their shared secret is used as
the key to be saved into the `sharedHashBucket`, which will be used for
check for replays. In addition, the fwdPkg's ID, which is SCID+height is
also saved to the bucket `batchReplayBkt`. Since replays of HTLCs cannot
happen at the same commitment height, when a replay happens,
`batchReplayBkt` simply doesn't have this info, and we again rely on
`sharedHashBucket` to detect it. This means most of the time the
`batchReplayBkt` is a list of SCID+height with empty values.

The `batchReplayBkt` was previously used as a mechanism to check for
reforwardings during startup - when reforwarding htlcs, it quries this
bucket and finds an empty map, knowing this is a forwarding and skips
the check in `sharedHashBucket`. Given now we use a bool flag to
explicitly skip the replay check, this bucket is no longer useful.
2025-06-17 11:39:38 +08:00
..
error_encryptor.go htlcswitch: convert blinded failures for blinded payments 2024-04-25 09:47:13 -04:00
forwarding_info.go multi: extract path ID and total amt from received payment 2024-07-26 09:54:18 +02:00
fuzz_test.go htlcswitch: split parsing and validation of TLV payloads 2024-04-25 09:15:58 -04:00
iterator.go htlcswitch: remove batchReplayBkt 2025-06-17 11:39:38 +08:00
iterator_test.go multi: rename nolint:lll to nolint:ll 2024-12-02 09:14:21 +02:00
log.go multi: start updating various loggers to use the new v2 type 2024-10-22 17:03:55 +02:00
payload.go multi: extract path ID and total amt from received payment 2024-07-26 09:54:18 +02:00
payload_test.go multi: rename nolint:lll to nolint:ll 2024-12-02 09:14:21 +02:00
type.go htlcswitch/hop: move hop.Exit and hop.Source to hop pkg 2019-09-05 01:35:23 -07:00