implement Close() in MockPubSub

This commit is contained in:
Black Swan 2025-11-18 00:30:45 +02:00
parent 215dd2ec99
commit de11685a89
2 changed files with 5 additions and 0 deletions

View File

@ -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.

View File

@ -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) {