From dc4111aad0ae0e5ae70cfd34deb37a330909b8ab Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 6 Aug 2025 13:53:44 +0200 Subject: [PATCH] graph/db: update test opaque addr to be valid The first byte of an opaque addr must be one that we dont understand yet. We do this update in preparation for doing an on-the-fly parse of persisted opaque addrs to see if they contain addrs that we now support. For this to work, the first byte cant be 0x01 since this maps to a known address. --- graph/db/graph_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/graph/db/graph_test.go b/graph/db/graph_test.go index b9d972b3b..2662d60c1 100644 --- a/graph/db/graph_test.go +++ b/graph/db/graph_test.go @@ -39,7 +39,10 @@ var ( "[2001:db8:85a3:0:0:8a2e:370:7334]:80") testAddrs = []net.Addr{testAddr, anotherAddr} testOpaqueAddr = &lnwire.OpaqueAddrs{ - Payload: []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06}, + // NOTE: the first byte is a protocol level address type. So + // for we set it to 0xff to guarantee that we do not know this + // type yet. + Payload: []byte{0xff, 0x02, 0x03, 0x04, 0x05, 0x06}, } testRBytes, _ = hex.DecodeString("8ce2bc69281ce27da07e6683571319d18" +