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 } }