mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 12:01:27 +02:00
htlcswitch/hop: use InvalidOnionVersion for replayed packets (#7937)
* htlcswitch/hop: use InvalidOnionVersion for replayed packets The link will send an update_fail_malformed_htlc, so we need to set the BADONION bit. Since there isn't a replay-specific error, we set the failure code to InvalidOnionVersion which has the BADONION bit. * release-notes: update for 0.17.1
This commit is contained in:
@@ -219,7 +219,7 @@ func testSphinxReplayPersistence(ht *lntest.HarnessTest) {
|
||||
// Assert that Fred receives the expected failure after Carol sent a
|
||||
// duplicate packet that fails due to sphinx replay detection.
|
||||
ht.AssertPaymentStatusFromStream(payStream, lnrpc.Payment_FAILED)
|
||||
ht.AssertLastHTLCError(fred, lnrpc.Failure_INVALID_ONION_KEY)
|
||||
ht.AssertLastHTLCError(fred, lnrpc.Failure_INVALID_ONION_VERSION)
|
||||
|
||||
// Since the payment failed, the balance should still be left
|
||||
// unaltered.
|
||||
|
Reference in New Issue
Block a user