multi: add models.Node V1 constructor

Add a version field to models.Node and a V1 constructor for it.
This commit is contained in:
Elle Mouton authored and yyforyongyu committed 2025-11-12 22:54:05 +08:00
1 parent 8f205e2d1c
commit 80e70096cb
18 files changed
+443 -340

No files matched your search

+3 -2
View File
@@ -89,8 +89,9 @@ func TestUpdateAdditionalEdge(t *testing.T) {
// Create a minimal test node using the private key priv1.
pub := priv1.PubKey().SerializeCompressed()
testNode := &models.Node{}
copy(testNode.PubKeyBytes[:], pub)
var pubKey [33]byte
copy(pubKey[:], pub)
testNode := models.NewV1ShellNode(pubKey)
nodeID, err := testNode.PubKey()
require.NoError(t, err, "failed to get node id")