From ca1cd025f3302d524bf699e07f4eb2da0b4842e4 Mon Sep 17 00:00:00 2001 From: Cassandra Heart Date: Tue, 25 Mar 2025 22:29:48 -0500 Subject: [PATCH] resolve rebuild progress bug --- node/rpc/hypergraph_sync_rpc_server_test.go | 7 +++++++ node/store/hypergraph.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/node/rpc/hypergraph_sync_rpc_server_test.go b/node/rpc/hypergraph_sync_rpc_server_test.go index 5627c64..1c37418 100644 --- a/node/rpc/hypergraph_sync_rpc_server_test.go +++ b/node/rpc/hypergraph_sync_rpc_server_test.go @@ -68,6 +68,13 @@ func TestLoadHypergraphFallback(t *testing.T) { for k, a := range clientLoad.GetVertexAdds() { assert.Equal(t, len(crypto.ConvertAllPreloadedLeaves(string(application.VertexAtomType), string(application.AddsPhaseType), k, clientHypergraphStore, a.GetTree().Root, []int{})), 100000) } + + fmt.Println("Should not reattempt") + + serverLoad, err = serverHypergraphStore.LoadHypergraph() + assert.NoError(t, err) + clientLoad, err = clientHypergraphStore.LoadHypergraph() + assert.NoError(t, err) } func TestHypergraphSyncServer(t *testing.T) { diff --git a/node/store/hypergraph.go b/node/store/hypergraph.go index 02a9f05..53da4c6 100644 --- a/node/store/hypergraph.go +++ b/node/store/hypergraph.go @@ -779,7 +779,7 @@ func (p *PebbleHypergraphStore) LoadHypergraph() ( } id := vert.GetID() if existingTree != nil { - if v, _ := existingTree.Get(id[:]); v == nil { + if v, _ := existingTree.Get(id[:]); v != nil { continue } }