graph/db: let test alias be UTF-8 compatible

Later on we will store the Alias as a Text field in our sql impls of the
graph db. For Postgres, this field then MUST be a valid UTF-8 string.
This is also the case in general for the alias according to [bolt
7](https://github.com/lightning/bolts/blob/e1fa25cf00446f3a6a6abbbc9a617cae5b75e39f/07-routing-gossip.md?plain=1#L313)
This commit is contained in:
Elle Mouton committed 2025-05-22 14:14:40 +02:00
1 parent 95d34be0d3
commit 8468c7c4ba
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -75,7 +75,7 @@ func createLightningNode(priv *btcec.PrivateKey) *models.LightningNode {
AuthSigBytes: testSig.Serialize(),
LastUpdate: time.Unix(updateTime, 0),
Color: color.RGBA{1, 2, 3, 0},
Alias: "kek" + string(pub[:]),
Alias: "kek" + hex.EncodeToString(pub),
Features: testFeatures,
Addresses: testAddrs,
}
+1 -1
View File
@@ -89,7 +89,7 @@ func createTestNode(t *testing.T) *models.LightningNode {
LastUpdate: time.Unix(updateTime, 0),
Addresses: testAddrs,
Color: color.RGBA{1, 2, 3, 0},
Alias: "kek" + string(pub[:]),
Alias: "kek" + hex.EncodeToString(pub),
AuthSigBytes: testSig.Serialize(),
Features: testFeatures,
}