Skip to content

Commit

Permalink
fixup! routing: Use NUMS point for blinded paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggie1984 committed Dec 6, 2024
1 parent 7a29013 commit 6c0bb1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions routing/blinding.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ func (s *BlindedPaymentPathSet) LargestLastHopPayloadPath() (*BlindedPayment,
if lastHopBlindedPk != nil && IsBlindedRouteNUMSTargetKey(
lastHopBlindedPk.SerializeCompressed(),
) {

if numHops == 1 {
return nil, nil, fmt.Errorf("route consists " +
"only of NUMS key as single hop")
Expand Down
4 changes: 3 additions & 1 deletion routing/pathfind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3621,7 +3621,9 @@ func TestLastHopPayloadSize(t *testing.T) {
var finalHop route.Hop
if tc.restrictions.BlindedPaymentPathSet != nil {
bPSet := tc.restrictions.BlindedPaymentPathSet
path, encryptedData, err := bPSet.LargestLastHopPayloadPath()
path, encryptedData, err := bPSet.
LargestLastHopPayloadPath()

require.NoError(t, err)
require.Equal(
t, tc.expectedEncryptedData,
Expand Down

0 comments on commit 6c0bb1c

Please sign in to comment.