htlcswitch: handle blinded path dummy hops

If a blinded path payload contains a signal that the following hop on
the path is a dummy hop, then we iteratively peel the dummy hops until
the final payload is reached.
This commit is contained in:
Elle Mouton committed 2024-07-26 09:54:18 +02:00
1 parent b0d3e4dc0d
commit 65aef6a69c
2 files changed
+72 -7

No files matched your search

+7
View File
@@ -206,6 +206,9 @@ func TestParseAndValidateRecipientData(t *testing.T) {
// Mocked error.
errDecryptFailed := errors.New("could not decrypt")
nodeKey, err := btcec.NewPrivateKey()
require.NoError(t, err)
tests := []struct {
name string
data []byte
@@ -284,6 +287,10 @@ func TestParseAndValidateRecipientData(t *testing.T) {
}
iterator := &sphinxHopIterator{
blindingKit: kit,
router: sphinx.NewRouter(
&sphinx.PrivKeyECDH{PrivKey: nodeKey},
sphinx.NewMemoryReplayLog(),
),
}
_, _, err = parseAndValidateRecipientData(