mulit: don't set customData on the lnrpc route level

We now make sure we only set the custom channel data in the
lnrpc.Route only if it contains relevant data.
This commit is contained in:
ziggie authored and yyforyongyu committed 2025-11-12 22:54:03 +08:00
1 parent f35c295bd8
commit cbfc0e0dc2
4 files changed
+26 -17

No files matched your search

+3 -13
View File
@@ -1,7 +1,6 @@
package itest
import (
"bytes"
"fmt"
"reflect"
"strings"
@@ -15,7 +14,6 @@ import (
"github.com/lightningnetwork/lnd/lntest/node"
"github.com/lightningnetwork/lnd/lntest/wait"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/stretchr/testify/require"
"google.golang.org/grpc/codes"
@@ -477,17 +475,9 @@ func testForwardInterceptorRestart(ht *lntest.HarnessTest) {
rt.FirstHopAmountMsat)
}
cr := lnwire.CustomRecords(p.FirstHopCustomRecords)
recordData, err := cr.Serialize()
if err != nil {
return err
}
if !bytes.Equal(rt.CustomChannelData, recordData) {
return fmt.Errorf("expected custom records to "+
"be equal, got %x expected %x",
rt.CustomChannelData, recordData)
}
// Make sure the custom channel data is nil because
// this is not a custom channel payment.
require.Nil(ht, rt.CustomChannelData)
return nil
},