diff --git a/node/execution/engines/compute_execution_engine_test.go b/node/execution/engines/compute_execution_engine_test.go index 55ff7f6..8f979da 100644 --- a/node/execution/engines/compute_execution_engine_test.go +++ b/node/execution/engines/compute_execution_engine_test.go @@ -827,6 +827,10 @@ func (m *mockPubSub) GetNetworkInfo() *protobufs.NetworkInfoResponse { return &protobufs.NetworkInfoResponse{} } +func (m *mockPubSub) Close() error { + return nil +} + type mockTransaction struct{} // Abort implements store.Transaction. diff --git a/node/rpc/hypergraph_sync_rpc_server_test.go b/node/rpc/hypergraph_sync_rpc_server_test.go index d88fcd8..f37e15d 100644 --- a/node/rpc/hypergraph_sync_rpc_server_test.go +++ b/node/rpc/hypergraph_sync_rpc_server_test.go @@ -31,7 +31,6 @@ import ( "source.quilibrium.com/quilibrium/monorepo/protobufs" application "source.quilibrium.com/quilibrium/monorepo/types/hypergraph" "source.quilibrium.com/quilibrium/monorepo/types/tries" - crypto "source.quilibrium.com/quilibrium/monorepo/types/tries" "source.quilibrium.com/quilibrium/monorepo/verenc" ) @@ -59,7 +58,7 @@ func TestHypergraphSyncServer(t *testing.T) { data1 := enc.Encrypt(make([]byte, 20), pub) verenc1 := data1[0].Compress() vertices1 := make([]application.Vertex, numOperations) - dataTree1 := &crypto.VectorCommitmentTree{} + dataTree1 := &tries.VectorCommitmentTree{} logger, _ := zap.NewDevelopment() inclusionProver := bls48581.NewKZGInclusionProver(logger) for _, d := range []application.Encrypted{verenc1} { @@ -273,7 +272,7 @@ func TestHypergraphSyncServer(t *testing.T) { } time.Sleep(10 * time.Second) str.CloseSend() - leaves := crypto.CompareLeaves( + leaves := tries.CompareLeaves( crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(), crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(), ) @@ -298,7 +297,7 @@ func TestHypergraphSyncServer(t *testing.T) { crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree().Commit(false), crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree().Commit(false), ) { - leaves := crypto.CompareLeaves( + leaves := tries.CompareLeaves( crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(), crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(), ) @@ -331,7 +330,7 @@ func TestHypergraphPartialSync(t *testing.T) { data1 := enc.Encrypt(make([]byte, 20), pub) verenc1 := data1[0].Compress() vertices1 := make([]application.Vertex, numOperations) - dataTree1 := &crypto.VectorCommitmentTree{} + dataTree1 := &tries.VectorCommitmentTree{} logger, _ := zap.NewDevelopment() inclusionProver := bls48581.NewKZGInclusionProver(logger) domain := make([]byte, 32) @@ -628,7 +627,7 @@ func TestHypergraphPartialSync(t *testing.T) { log.Fatalf("Client: failed to sync 1: %v", err) } str.CloseSend() - leaves := crypto.CompareLeaves( + leaves := tries.CompareLeaves( crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(), crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(), ) @@ -751,7 +750,7 @@ func TestHypergraphPartialSync(t *testing.T) { crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree().Commit(false), crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree().Commit(false), ) { - leaves := crypto.CompareLeaves( + leaves := tries.CompareLeaves( crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(), crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(), ) diff --git a/node/rpc/proxy_blossomsub_test.go b/node/rpc/proxy_blossomsub_test.go index ef27436..7e7ece6 100644 --- a/node/rpc/proxy_blossomsub_test.go +++ b/node/rpc/proxy_blossomsub_test.go @@ -177,6 +177,7 @@ func (m *mockPubSub) DiscoverPeers(ctx context.Context) error { return nil func (m *mockPubSub) GetNetwork() uint { return 0 } func (m *mockPubSub) IsPeerConnected(peerId []byte) bool { return true } func (m *mockPubSub) Reachability() *wrapperspb.BoolValue { return wrapperspb.Bool(true) } +func (m *mockPubSub) Close() error { return nil } // Test helper functions func createTestConfigs() (*config.P2PConfig, *config.EngineConfig, error) { @@ -571,7 +572,7 @@ func TestTLSXSignConnection(t *testing.T) { defer conn.Close() // Create the proxy client - client := rpc.NewPubSubProxyClient(conn, zap.NewNop()) + client := rpc.NewPubSubProxyClient(context.TODO(), conn, zap.NewNop()) // Test that we can actually use the TLS connection testBitmask := []byte("tls-test")