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:
2 files changed
+72
-7
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user