From 22f5f38c65ab98ccbf8ff629074657497835c63c Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Fri, 18 Oct 2024 09:13:17 -0700 Subject: [PATCH] Update go generate --- core/crypto/pb/crypto.pb.go | 50 ++---- .../mocks/mock_conn_management_scope.go | 17 +- core/network/mocks/mock_peer_scope.go | 17 +- core/network/mocks/mock_protocol_scope.go | 17 +- core/network/mocks/mock_resource_manager.go | 17 +- .../network/mocks/mock_resource_scope_span.go | 17 +- .../mocks/mock_stream_management_scope.go | 33 ++-- core/peer/pb/peer_record.pb.go | 50 ++---- core/record/pb/envelope.pb.go | 28 +-- core/sec/insecure/pb/plaintext.pb.go | 28 +-- p2p/host/autonat/pb/autonat.pb.go | 94 ++-------- p2p/host/basic/mock_nat_test.go | 25 +-- p2p/host/peerstore/pstoreds/pb/pstore.pb.go | 72 ++------ p2p/host/pstoremanager/mock_peerstore_test.go | 73 ++++---- p2p/net/nat/mock_nat_test.go | 17 +- p2p/protocol/autonatv2/pb/autonatv2.pb.go | 160 ++++-------------- p2p/protocol/circuitv2/pb/circuit.pb.go | 116 +++---------- p2p/protocol/circuitv2/pb/voucher.pb.go | 28 +-- p2p/protocol/holepunch/pb/holepunch.pb.go | 28 +-- p2p/protocol/identify/pb/identify.pb.go | 28 +-- p2p/security/noise/pb/payload.pb.go | 50 ++---- .../transport/mock_connection_gater_test.go | 9 +- .../quic/mock_connection_gater_test.go | 9 +- p2p/transport/webrtc/pb/message.pb.go | 28 +-- .../mock_connection_gater_test.go | 9 +- 25 files changed, 286 insertions(+), 734 deletions(-) diff --git a/core/crypto/pb/crypto.pb.go b/core/crypto/pb/crypto.pb.go index 4c83183e58..d960889763 100644 --- a/core/crypto/pb/crypto.pb.go +++ b/core/crypto/pb/crypto.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: core/crypto/pb/crypto.proto package pb @@ -93,11 +93,9 @@ type PublicKey struct { func (x *PublicKey) Reset() { *x = PublicKey{} - if protoimpl.UnsafeEnabled { - mi := &file_core_crypto_pb_crypto_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_crypto_pb_crypto_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PublicKey) String() string { @@ -108,7 +106,7 @@ func (*PublicKey) ProtoMessage() {} func (x *PublicKey) ProtoReflect() protoreflect.Message { mi := &file_core_crypto_pb_crypto_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -148,11 +146,9 @@ type PrivateKey struct { func (x *PrivateKey) Reset() { *x = PrivateKey{} - if protoimpl.UnsafeEnabled { - mi := &file_core_crypto_pb_crypto_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_crypto_pb_crypto_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PrivateKey) String() string { @@ -163,7 +159,7 @@ func (*PrivateKey) ProtoMessage() {} func (x *PrivateKey) ProtoReflect() protoreflect.Message { mi := &file_core_crypto_pb_crypto_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -250,32 +246,6 @@ func file_core_crypto_pb_crypto_proto_init() { if File_core_crypto_pb_crypto_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_core_crypto_pb_crypto_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PublicKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_crypto_pb_crypto_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PrivateKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/network/mocks/mock_conn_management_scope.go b/core/network/mocks/mock_conn_management_scope.go index d6538e17a3..649da0aa0f 100644 --- a/core/network/mocks/mock_conn_management_scope.go +++ b/core/network/mocks/mock_conn_management_scope.go @@ -21,6 +21,7 @@ import ( type MockConnManagementScope struct { ctrl *gomock.Controller recorder *MockConnManagementScopeMockRecorder + isgomock struct{} } // MockConnManagementScopeMockRecorder is the mock recorder for MockConnManagementScope. @@ -82,29 +83,29 @@ func (mr *MockConnManagementScopeMockRecorder) PeerScope() *gomock.Call { } // ReleaseMemory mocks base method. -func (m *MockConnManagementScope) ReleaseMemory(arg0 int) { +func (m *MockConnManagementScope) ReleaseMemory(size int) { m.ctrl.T.Helper() - m.ctrl.Call(m, "ReleaseMemory", arg0) + m.ctrl.Call(m, "ReleaseMemory", size) } // ReleaseMemory indicates an expected call of ReleaseMemory. -func (mr *MockConnManagementScopeMockRecorder) ReleaseMemory(arg0 any) *gomock.Call { +func (mr *MockConnManagementScopeMockRecorder) ReleaseMemory(size any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockConnManagementScope)(nil).ReleaseMemory), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockConnManagementScope)(nil).ReleaseMemory), size) } // ReserveMemory mocks base method. -func (m *MockConnManagementScope) ReserveMemory(arg0 int, arg1 byte) error { +func (m *MockConnManagementScope) ReserveMemory(size int, prio uint8) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReserveMemory", arg0, arg1) + ret := m.ctrl.Call(m, "ReserveMemory", size, prio) ret0, _ := ret[0].(error) return ret0 } // ReserveMemory indicates an expected call of ReserveMemory. -func (mr *MockConnManagementScopeMockRecorder) ReserveMemory(arg0, arg1 any) *gomock.Call { +func (mr *MockConnManagementScopeMockRecorder) ReserveMemory(size, prio any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockConnManagementScope)(nil).ReserveMemory), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockConnManagementScope)(nil).ReserveMemory), size, prio) } // SetPeer mocks base method. diff --git a/core/network/mocks/mock_peer_scope.go b/core/network/mocks/mock_peer_scope.go index 325a894c2c..e5d0e70c1f 100644 --- a/core/network/mocks/mock_peer_scope.go +++ b/core/network/mocks/mock_peer_scope.go @@ -21,6 +21,7 @@ import ( type MockPeerScope struct { ctrl *gomock.Controller recorder *MockPeerScopeMockRecorder + isgomock struct{} } // MockPeerScopeMockRecorder is the mock recorder for MockPeerScope. @@ -70,29 +71,29 @@ func (mr *MockPeerScopeMockRecorder) Peer() *gomock.Call { } // ReleaseMemory mocks base method. -func (m *MockPeerScope) ReleaseMemory(arg0 int) { +func (m *MockPeerScope) ReleaseMemory(size int) { m.ctrl.T.Helper() - m.ctrl.Call(m, "ReleaseMemory", arg0) + m.ctrl.Call(m, "ReleaseMemory", size) } // ReleaseMemory indicates an expected call of ReleaseMemory. -func (mr *MockPeerScopeMockRecorder) ReleaseMemory(arg0 any) *gomock.Call { +func (mr *MockPeerScopeMockRecorder) ReleaseMemory(size any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockPeerScope)(nil).ReleaseMemory), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockPeerScope)(nil).ReleaseMemory), size) } // ReserveMemory mocks base method. -func (m *MockPeerScope) ReserveMemory(arg0 int, arg1 byte) error { +func (m *MockPeerScope) ReserveMemory(size int, prio uint8) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReserveMemory", arg0, arg1) + ret := m.ctrl.Call(m, "ReserveMemory", size, prio) ret0, _ := ret[0].(error) return ret0 } // ReserveMemory indicates an expected call of ReserveMemory. -func (mr *MockPeerScopeMockRecorder) ReserveMemory(arg0, arg1 any) *gomock.Call { +func (mr *MockPeerScopeMockRecorder) ReserveMemory(size, prio any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockPeerScope)(nil).ReserveMemory), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockPeerScope)(nil).ReserveMemory), size, prio) } // Stat mocks base method. diff --git a/core/network/mocks/mock_protocol_scope.go b/core/network/mocks/mock_protocol_scope.go index 80d29676b9..237c3daf0a 100644 --- a/core/network/mocks/mock_protocol_scope.go +++ b/core/network/mocks/mock_protocol_scope.go @@ -21,6 +21,7 @@ import ( type MockProtocolScope struct { ctrl *gomock.Controller recorder *MockProtocolScopeMockRecorder + isgomock struct{} } // MockProtocolScopeMockRecorder is the mock recorder for MockProtocolScope. @@ -70,29 +71,29 @@ func (mr *MockProtocolScopeMockRecorder) Protocol() *gomock.Call { } // ReleaseMemory mocks base method. -func (m *MockProtocolScope) ReleaseMemory(arg0 int) { +func (m *MockProtocolScope) ReleaseMemory(size int) { m.ctrl.T.Helper() - m.ctrl.Call(m, "ReleaseMemory", arg0) + m.ctrl.Call(m, "ReleaseMemory", size) } // ReleaseMemory indicates an expected call of ReleaseMemory. -func (mr *MockProtocolScopeMockRecorder) ReleaseMemory(arg0 any) *gomock.Call { +func (mr *MockProtocolScopeMockRecorder) ReleaseMemory(size any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockProtocolScope)(nil).ReleaseMemory), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockProtocolScope)(nil).ReleaseMemory), size) } // ReserveMemory mocks base method. -func (m *MockProtocolScope) ReserveMemory(arg0 int, arg1 byte) error { +func (m *MockProtocolScope) ReserveMemory(size int, prio uint8) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReserveMemory", arg0, arg1) + ret := m.ctrl.Call(m, "ReserveMemory", size, prio) ret0, _ := ret[0].(error) return ret0 } // ReserveMemory indicates an expected call of ReserveMemory. -func (mr *MockProtocolScopeMockRecorder) ReserveMemory(arg0, arg1 any) *gomock.Call { +func (mr *MockProtocolScopeMockRecorder) ReserveMemory(size, prio any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockProtocolScope)(nil).ReserveMemory), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockProtocolScope)(nil).ReserveMemory), size, prio) } // Stat mocks base method. diff --git a/core/network/mocks/mock_resource_manager.go b/core/network/mocks/mock_resource_manager.go index 98e186e1ff..b31ddb13d1 100644 --- a/core/network/mocks/mock_resource_manager.go +++ b/core/network/mocks/mock_resource_manager.go @@ -23,6 +23,7 @@ import ( type MockResourceManager struct { ctrl *gomock.Controller recorder *MockResourceManagerMockRecorder + isgomock struct{} } // MockResourceManagerMockRecorder is the mock recorder for MockResourceManager. @@ -57,33 +58,33 @@ func (mr *MockResourceManagerMockRecorder) Close() *gomock.Call { } // OpenConnection mocks base method. -func (m *MockResourceManager) OpenConnection(arg0 network.Direction, arg1 bool, arg2 multiaddr.Multiaddr) (network.ConnManagementScope, error) { +func (m *MockResourceManager) OpenConnection(dir network.Direction, usefd bool, endpoint multiaddr.Multiaddr) (network.ConnManagementScope, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "OpenConnection", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "OpenConnection", dir, usefd, endpoint) ret0, _ := ret[0].(network.ConnManagementScope) ret1, _ := ret[1].(error) return ret0, ret1 } // OpenConnection indicates an expected call of OpenConnection. -func (mr *MockResourceManagerMockRecorder) OpenConnection(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockResourceManagerMockRecorder) OpenConnection(dir, usefd, endpoint any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenConnection", reflect.TypeOf((*MockResourceManager)(nil).OpenConnection), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenConnection", reflect.TypeOf((*MockResourceManager)(nil).OpenConnection), dir, usefd, endpoint) } // OpenStream mocks base method. -func (m *MockResourceManager) OpenStream(arg0 peer.ID, arg1 network.Direction) (network.StreamManagementScope, error) { +func (m *MockResourceManager) OpenStream(p peer.ID, dir network.Direction) (network.StreamManagementScope, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "OpenStream", arg0, arg1) + ret := m.ctrl.Call(m, "OpenStream", p, dir) ret0, _ := ret[0].(network.StreamManagementScope) ret1, _ := ret[1].(error) return ret0, ret1 } // OpenStream indicates an expected call of OpenStream. -func (mr *MockResourceManagerMockRecorder) OpenStream(arg0, arg1 any) *gomock.Call { +func (mr *MockResourceManagerMockRecorder) OpenStream(p, dir any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockResourceManager)(nil).OpenStream), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenStream", reflect.TypeOf((*MockResourceManager)(nil).OpenStream), p, dir) } // ViewPeer mocks base method. diff --git a/core/network/mocks/mock_resource_scope_span.go b/core/network/mocks/mock_resource_scope_span.go index 5123ff8d75..0a1db10953 100644 --- a/core/network/mocks/mock_resource_scope_span.go +++ b/core/network/mocks/mock_resource_scope_span.go @@ -20,6 +20,7 @@ import ( type MockResourceScopeSpan struct { ctrl *gomock.Controller recorder *MockResourceScopeSpanMockRecorder + isgomock struct{} } // MockResourceScopeSpanMockRecorder is the mock recorder for MockResourceScopeSpan. @@ -67,29 +68,29 @@ func (mr *MockResourceScopeSpanMockRecorder) Done() *gomock.Call { } // ReleaseMemory mocks base method. -func (m *MockResourceScopeSpan) ReleaseMemory(arg0 int) { +func (m *MockResourceScopeSpan) ReleaseMemory(size int) { m.ctrl.T.Helper() - m.ctrl.Call(m, "ReleaseMemory", arg0) + m.ctrl.Call(m, "ReleaseMemory", size) } // ReleaseMemory indicates an expected call of ReleaseMemory. -func (mr *MockResourceScopeSpanMockRecorder) ReleaseMemory(arg0 any) *gomock.Call { +func (mr *MockResourceScopeSpanMockRecorder) ReleaseMemory(size any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockResourceScopeSpan)(nil).ReleaseMemory), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockResourceScopeSpan)(nil).ReleaseMemory), size) } // ReserveMemory mocks base method. -func (m *MockResourceScopeSpan) ReserveMemory(arg0 int, arg1 byte) error { +func (m *MockResourceScopeSpan) ReserveMemory(size int, prio uint8) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReserveMemory", arg0, arg1) + ret := m.ctrl.Call(m, "ReserveMemory", size, prio) ret0, _ := ret[0].(error) return ret0 } // ReserveMemory indicates an expected call of ReserveMemory. -func (mr *MockResourceScopeSpanMockRecorder) ReserveMemory(arg0, arg1 any) *gomock.Call { +func (mr *MockResourceScopeSpanMockRecorder) ReserveMemory(size, prio any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockResourceScopeSpan)(nil).ReserveMemory), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockResourceScopeSpan)(nil).ReserveMemory), size, prio) } // Stat mocks base method. diff --git a/core/network/mocks/mock_stream_management_scope.go b/core/network/mocks/mock_stream_management_scope.go index 472eb7acb8..9336cac2f4 100644 --- a/core/network/mocks/mock_stream_management_scope.go +++ b/core/network/mocks/mock_stream_management_scope.go @@ -21,6 +21,7 @@ import ( type MockStreamManagementScope struct { ctrl *gomock.Controller recorder *MockStreamManagementScopeMockRecorder + isgomock struct{} } // MockStreamManagementScopeMockRecorder is the mock recorder for MockStreamManagementScope. @@ -96,29 +97,29 @@ func (mr *MockStreamManagementScopeMockRecorder) ProtocolScope() *gomock.Call { } // ReleaseMemory mocks base method. -func (m *MockStreamManagementScope) ReleaseMemory(arg0 int) { +func (m *MockStreamManagementScope) ReleaseMemory(size int) { m.ctrl.T.Helper() - m.ctrl.Call(m, "ReleaseMemory", arg0) + m.ctrl.Call(m, "ReleaseMemory", size) } // ReleaseMemory indicates an expected call of ReleaseMemory. -func (mr *MockStreamManagementScopeMockRecorder) ReleaseMemory(arg0 any) *gomock.Call { +func (mr *MockStreamManagementScopeMockRecorder) ReleaseMemory(size any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockStreamManagementScope)(nil).ReleaseMemory), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseMemory", reflect.TypeOf((*MockStreamManagementScope)(nil).ReleaseMemory), size) } // ReserveMemory mocks base method. -func (m *MockStreamManagementScope) ReserveMemory(arg0 int, arg1 byte) error { +func (m *MockStreamManagementScope) ReserveMemory(size int, prio uint8) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ReserveMemory", arg0, arg1) + ret := m.ctrl.Call(m, "ReserveMemory", size, prio) ret0, _ := ret[0].(error) return ret0 } // ReserveMemory indicates an expected call of ReserveMemory. -func (mr *MockStreamManagementScopeMockRecorder) ReserveMemory(arg0, arg1 any) *gomock.Call { +func (mr *MockStreamManagementScopeMockRecorder) ReserveMemory(size, prio any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockStreamManagementScope)(nil).ReserveMemory), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReserveMemory", reflect.TypeOf((*MockStreamManagementScope)(nil).ReserveMemory), size, prio) } // ServiceScope mocks base method. @@ -136,31 +137,31 @@ func (mr *MockStreamManagementScopeMockRecorder) ServiceScope() *gomock.Call { } // SetProtocol mocks base method. -func (m *MockStreamManagementScope) SetProtocol(arg0 protocol.ID) error { +func (m *MockStreamManagementScope) SetProtocol(proto protocol.ID) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetProtocol", arg0) + ret := m.ctrl.Call(m, "SetProtocol", proto) ret0, _ := ret[0].(error) return ret0 } // SetProtocol indicates an expected call of SetProtocol. -func (mr *MockStreamManagementScopeMockRecorder) SetProtocol(arg0 any) *gomock.Call { +func (mr *MockStreamManagementScopeMockRecorder) SetProtocol(proto any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProtocol", reflect.TypeOf((*MockStreamManagementScope)(nil).SetProtocol), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetProtocol", reflect.TypeOf((*MockStreamManagementScope)(nil).SetProtocol), proto) } // SetService mocks base method. -func (m *MockStreamManagementScope) SetService(arg0 string) error { +func (m *MockStreamManagementScope) SetService(srv string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetService", arg0) + ret := m.ctrl.Call(m, "SetService", srv) ret0, _ := ret[0].(error) return ret0 } // SetService indicates an expected call of SetService. -func (mr *MockStreamManagementScopeMockRecorder) SetService(arg0 any) *gomock.Call { +func (mr *MockStreamManagementScopeMockRecorder) SetService(srv any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetService", reflect.TypeOf((*MockStreamManagementScope)(nil).SetService), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetService", reflect.TypeOf((*MockStreamManagementScope)(nil).SetService), srv) } // Stat mocks base method. diff --git a/core/peer/pb/peer_record.pb.go b/core/peer/pb/peer_record.pb.go index ef9e2aea11..56146e32b6 100644 --- a/core/peer/pb/peer_record.pb.go +++ b/core/peer/pb/peer_record.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: core/peer/pb/peer_record.proto package pb @@ -43,11 +43,9 @@ type PeerRecord struct { func (x *PeerRecord) Reset() { *x = PeerRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_core_peer_pb_peer_record_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_peer_pb_peer_record_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PeerRecord) String() string { @@ -58,7 +56,7 @@ func (*PeerRecord) ProtoMessage() {} func (x *PeerRecord) ProtoReflect() protoreflect.Message { mi := &file_core_peer_pb_peer_record_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -106,11 +104,9 @@ type PeerRecord_AddressInfo struct { func (x *PeerRecord_AddressInfo) Reset() { *x = PeerRecord_AddressInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_core_peer_pb_peer_record_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_peer_pb_peer_record_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PeerRecord_AddressInfo) String() string { @@ -121,7 +117,7 @@ func (*PeerRecord_AddressInfo) ProtoMessage() {} func (x *PeerRecord_AddressInfo) ProtoReflect() protoreflect.Message { mi := &file_core_peer_pb_peer_record_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,32 +192,6 @@ func file_core_peer_pb_peer_record_proto_init() { if File_core_peer_pb_peer_record_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_core_peer_pb_peer_record_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*PeerRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_core_peer_pb_peer_record_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*PeerRecord_AddressInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/record/pb/envelope.pb.go b/core/record/pb/envelope.pb.go index 9be1a5fff1..8da0e0eea5 100644 --- a/core/record/pb/envelope.pb.go +++ b/core/record/pb/envelope.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: core/record/pb/envelope.proto package pb @@ -49,11 +49,9 @@ type Envelope struct { func (x *Envelope) Reset() { *x = Envelope{} - if protoimpl.UnsafeEnabled { - mi := &file_core_record_pb_envelope_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_record_pb_envelope_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Envelope) String() string { @@ -64,7 +62,7 @@ func (*Envelope) ProtoMessage() {} func (x *Envelope) ProtoReflect() protoreflect.Message { mi := &file_core_record_pb_envelope_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -161,20 +159,6 @@ func file_core_record_pb_envelope_proto_init() { if File_core_record_pb_envelope_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_core_record_pb_envelope_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Envelope); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/core/sec/insecure/pb/plaintext.pb.go b/core/sec/insecure/pb/plaintext.pb.go index 4484464146..64ab191b99 100644 --- a/core/sec/insecure/pb/plaintext.pb.go +++ b/core/sec/insecure/pb/plaintext.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: core/sec/insecure/pb/plaintext.proto package pb @@ -32,11 +32,9 @@ type Exchange struct { func (x *Exchange) Reset() { *x = Exchange{} - if protoimpl.UnsafeEnabled { - mi := &file_core_sec_insecure_pb_plaintext_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_core_sec_insecure_pb_plaintext_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Exchange) String() string { @@ -47,7 +45,7 @@ func (*Exchange) ProtoMessage() {} func (x *Exchange) ProtoReflect() protoreflect.Message { mi := &file_core_sec_insecure_pb_plaintext_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -125,20 +123,6 @@ func file_core_sec_insecure_pb_plaintext_proto_init() { if File_core_sec_insecure_pb_plaintext_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_core_sec_insecure_pb_plaintext_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Exchange); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/p2p/host/autonat/pb/autonat.pb.go b/p2p/host/autonat/pb/autonat.pb.go index 26944fcbcc..46eed5986b 100644 --- a/p2p/host/autonat/pb/autonat.pb.go +++ b/p2p/host/autonat/pb/autonat.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/host/autonat/pb/autonat.proto package pb @@ -153,11 +153,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -168,7 +166,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -215,11 +213,9 @@ type Message_PeerInfo struct { func (x *Message_PeerInfo) Reset() { *x = Message_PeerInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message_PeerInfo) String() string { @@ -230,7 +226,7 @@ func (*Message_PeerInfo) ProtoMessage() {} func (x *Message_PeerInfo) ProtoReflect() protoreflect.Message { mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -269,11 +265,9 @@ type Message_Dial struct { func (x *Message_Dial) Reset() { *x = Message_Dial{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message_Dial) String() string { @@ -284,7 +278,7 @@ func (*Message_Dial) ProtoMessage() {} func (x *Message_Dial) ProtoReflect() protoreflect.Message { mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -318,11 +312,9 @@ type Message_DialResponse struct { func (x *Message_DialResponse) Reset() { *x = Message_DialResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message_DialResponse) String() string { @@ -333,7 +325,7 @@ func (*Message_DialResponse) ProtoMessage() {} func (x *Message_DialResponse) ProtoReflect() protoreflect.Message { mi := &file_p2p_host_autonat_pb_autonat_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,56 +448,6 @@ func file_p2p_host_autonat_pb_autonat_proto_init() { if File_p2p_host_autonat_pb_autonat_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_host_autonat_pb_autonat_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_host_autonat_pb_autonat_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Message_PeerInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_host_autonat_pb_autonat_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Message_Dial); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_host_autonat_pb_autonat_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Message_DialResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/p2p/host/basic/mock_nat_test.go b/p2p/host/basic/mock_nat_test.go index e601e7109d..924e52c566 100644 --- a/p2p/host/basic/mock_nat_test.go +++ b/p2p/host/basic/mock_nat_test.go @@ -21,6 +21,7 @@ import ( type MockNAT struct { ctrl *gomock.Controller recorder *MockNATMockRecorder + isgomock struct{} } // MockNATMockRecorder is the mock recorder for MockNAT. @@ -41,17 +42,17 @@ func (m *MockNAT) EXPECT() *MockNATMockRecorder { } // AddMapping mocks base method. -func (m *MockNAT) AddMapping(arg0 context.Context, arg1 string, arg2 int) error { +func (m *MockNAT) AddMapping(ctx context.Context, protocol string, port int) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddMapping", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AddMapping", ctx, protocol, port) ret0, _ := ret[0].(error) return ret0 } // AddMapping indicates an expected call of AddMapping. -func (mr *MockNATMockRecorder) AddMapping(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNATMockRecorder) AddMapping(ctx, protocol, port any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMapping", reflect.TypeOf((*MockNAT)(nil).AddMapping), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddMapping", reflect.TypeOf((*MockNAT)(nil).AddMapping), ctx, protocol, port) } // Close mocks base method. @@ -69,30 +70,30 @@ func (mr *MockNATMockRecorder) Close() *gomock.Call { } // GetMapping mocks base method. -func (m *MockNAT) GetMapping(arg0 string, arg1 int) (netip.AddrPort, bool) { +func (m *MockNAT) GetMapping(protocol string, port int) (netip.AddrPort, bool) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetMapping", arg0, arg1) + ret := m.ctrl.Call(m, "GetMapping", protocol, port) ret0, _ := ret[0].(netip.AddrPort) ret1, _ := ret[1].(bool) return ret0, ret1 } // GetMapping indicates an expected call of GetMapping. -func (mr *MockNATMockRecorder) GetMapping(arg0, arg1 any) *gomock.Call { +func (mr *MockNATMockRecorder) GetMapping(protocol, port any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMapping", reflect.TypeOf((*MockNAT)(nil).GetMapping), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMapping", reflect.TypeOf((*MockNAT)(nil).GetMapping), protocol, port) } // RemoveMapping mocks base method. -func (m *MockNAT) RemoveMapping(arg0 context.Context, arg1 string, arg2 int) error { +func (m *MockNAT) RemoveMapping(ctx context.Context, protocol string, port int) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveMapping", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "RemoveMapping", ctx, protocol, port) ret0, _ := ret[0].(error) return ret0 } // RemoveMapping indicates an expected call of RemoveMapping. -func (mr *MockNATMockRecorder) RemoveMapping(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNATMockRecorder) RemoveMapping(ctx, protocol, port any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMapping", reflect.TypeOf((*MockNAT)(nil).RemoveMapping), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMapping", reflect.TypeOf((*MockNAT)(nil).RemoveMapping), ctx, protocol, port) } diff --git a/p2p/host/peerstore/pstoreds/pb/pstore.pb.go b/p2p/host/peerstore/pstoreds/pb/pstore.pb.go index 5ac20406cc..5130bb3865 100644 --- a/p2p/host/peerstore/pstoreds/pb/pstore.pb.go +++ b/p2p/host/peerstore/pstoreds/pb/pstore.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/host/peerstore/pstoreds/pb/pstore.proto package pb @@ -36,11 +36,9 @@ type AddrBookRecord struct { func (x *AddrBookRecord) Reset() { *x = AddrBookRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddrBookRecord) String() string { @@ -51,7 +49,7 @@ func (*AddrBookRecord) ProtoMessage() {} func (x *AddrBookRecord) ProtoReflect() protoreflect.Message { mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -102,11 +100,9 @@ type AddrBookRecord_AddrEntry struct { func (x *AddrBookRecord_AddrEntry) Reset() { *x = AddrBookRecord_AddrEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddrBookRecord_AddrEntry) String() string { @@ -117,7 +113,7 @@ func (*AddrBookRecord_AddrEntry) ProtoMessage() {} func (x *AddrBookRecord_AddrEntry) ProtoReflect() protoreflect.Message { mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -168,11 +164,9 @@ type AddrBookRecord_CertifiedRecord struct { func (x *AddrBookRecord_CertifiedRecord) Reset() { *x = AddrBookRecord_CertifiedRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AddrBookRecord_CertifiedRecord) String() string { @@ -183,7 +177,7 @@ func (*AddrBookRecord_CertifiedRecord) ProtoMessage() {} func (x *AddrBookRecord_CertifiedRecord) ProtoReflect() protoreflect.Message { mi := &file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -278,44 +272,6 @@ func file_p2p_host_peerstore_pstoreds_pb_pstore_proto_init() { if File_p2p_host_peerstore_pstoreds_pb_pstore_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AddrBookRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AddrBookRecord_AddrEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_host_peerstore_pstoreds_pb_pstore_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AddrBookRecord_CertifiedRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/p2p/host/pstoremanager/mock_peerstore_test.go b/p2p/host/pstoremanager/mock_peerstore_test.go index b704cb1fd1..2196dccbef 100644 --- a/p2p/host/pstoremanager/mock_peerstore_test.go +++ b/p2p/host/pstoremanager/mock_peerstore_test.go @@ -25,6 +25,7 @@ import ( type MockPeerstore struct { ctrl *gomock.Controller recorder *MockPeerstoreMockRecorder + isgomock struct{} } // MockPeerstoreMockRecorder is the mock recorder for MockPeerstore. @@ -45,27 +46,27 @@ func (m *MockPeerstore) EXPECT() *MockPeerstoreMockRecorder { } // AddAddr mocks base method. -func (m *MockPeerstore) AddAddr(arg0 peer.ID, arg1 multiaddr.Multiaddr, arg2 time.Duration) { +func (m *MockPeerstore) AddAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddAddr", arg0, arg1, arg2) + m.ctrl.Call(m, "AddAddr", p, addr, ttl) } // AddAddr indicates an expected call of AddAddr. -func (mr *MockPeerstoreMockRecorder) AddAddr(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) AddAddr(p, addr, ttl any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAddr", reflect.TypeOf((*MockPeerstore)(nil).AddAddr), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAddr", reflect.TypeOf((*MockPeerstore)(nil).AddAddr), p, addr, ttl) } // AddAddrs mocks base method. -func (m *MockPeerstore) AddAddrs(arg0 peer.ID, arg1 []multiaddr.Multiaddr, arg2 time.Duration) { +func (m *MockPeerstore) AddAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration) { m.ctrl.T.Helper() - m.ctrl.Call(m, "AddAddrs", arg0, arg1, arg2) + m.ctrl.Call(m, "AddAddrs", p, addrs, ttl) } // AddAddrs indicates an expected call of AddAddrs. -func (mr *MockPeerstoreMockRecorder) AddAddrs(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) AddAddrs(p, addrs, ttl any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAddrs", reflect.TypeOf((*MockPeerstore)(nil).AddAddrs), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddAddrs", reflect.TypeOf((*MockPeerstore)(nil).AddAddrs), p, addrs, ttl) } // AddPrivKey mocks base method. @@ -130,29 +131,29 @@ func (mr *MockPeerstoreMockRecorder) AddrStream(arg0, arg1 any) *gomock.Call { } // Addrs mocks base method. -func (m *MockPeerstore) Addrs(arg0 peer.ID) []multiaddr.Multiaddr { +func (m *MockPeerstore) Addrs(p peer.ID) []multiaddr.Multiaddr { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Addrs", arg0) + ret := m.ctrl.Call(m, "Addrs", p) ret0, _ := ret[0].([]multiaddr.Multiaddr) return ret0 } // Addrs indicates an expected call of Addrs. -func (mr *MockPeerstoreMockRecorder) Addrs(arg0 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) Addrs(p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addrs", reflect.TypeOf((*MockPeerstore)(nil).Addrs), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Addrs", reflect.TypeOf((*MockPeerstore)(nil).Addrs), p) } // ClearAddrs mocks base method. -func (m *MockPeerstore) ClearAddrs(arg0 peer.ID) { +func (m *MockPeerstore) ClearAddrs(p peer.ID) { m.ctrl.T.Helper() - m.ctrl.Call(m, "ClearAddrs", arg0) + m.ctrl.Call(m, "ClearAddrs", p) } // ClearAddrs indicates an expected call of ClearAddrs. -func (mr *MockPeerstoreMockRecorder) ClearAddrs(arg0 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) ClearAddrs(p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearAddrs", reflect.TypeOf((*MockPeerstore)(nil).ClearAddrs), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClearAddrs", reflect.TypeOf((*MockPeerstore)(nil).ClearAddrs), p) } // Close mocks base method. @@ -190,18 +191,18 @@ func (mr *MockPeerstoreMockRecorder) FirstSupportedProtocol(arg0 any, arg1 ...an } // Get mocks base method. -func (m *MockPeerstore) Get(arg0 peer.ID, arg1 string) (any, error) { +func (m *MockPeerstore) Get(p peer.ID, key string) (any, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0, arg1) + ret := m.ctrl.Call(m, "Get", p, key) ret0, _ := ret[0].(any) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockPeerstoreMockRecorder) Get(arg0, arg1 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) Get(p, key any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPeerstore)(nil).Get), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPeerstore)(nil).Get), p, key) } // GetProtocols mocks base method. @@ -318,17 +319,17 @@ func (mr *MockPeerstoreMockRecorder) PubKey(arg0 any) *gomock.Call { } // Put mocks base method. -func (m *MockPeerstore) Put(arg0 peer.ID, arg1 string, arg2 any) error { +func (m *MockPeerstore) Put(p peer.ID, key string, val any) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Put", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Put", p, key, val) ret0, _ := ret[0].(error) return ret0 } // Put indicates an expected call of Put. -func (mr *MockPeerstoreMockRecorder) Put(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) Put(p, key, val any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockPeerstore)(nil).Put), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockPeerstore)(nil).Put), p, key, val) } // RecordLatency mocks base method. @@ -375,27 +376,27 @@ func (mr *MockPeerstoreMockRecorder) RemoveProtocols(arg0 any, arg1 ...any) *gom } // SetAddr mocks base method. -func (m *MockPeerstore) SetAddr(arg0 peer.ID, arg1 multiaddr.Multiaddr, arg2 time.Duration) { +func (m *MockPeerstore) SetAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetAddr", arg0, arg1, arg2) + m.ctrl.Call(m, "SetAddr", p, addr, ttl) } // SetAddr indicates an expected call of SetAddr. -func (mr *MockPeerstoreMockRecorder) SetAddr(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) SetAddr(p, addr, ttl any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddr", reflect.TypeOf((*MockPeerstore)(nil).SetAddr), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddr", reflect.TypeOf((*MockPeerstore)(nil).SetAddr), p, addr, ttl) } // SetAddrs mocks base method. -func (m *MockPeerstore) SetAddrs(arg0 peer.ID, arg1 []multiaddr.Multiaddr, arg2 time.Duration) { +func (m *MockPeerstore) SetAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration) { m.ctrl.T.Helper() - m.ctrl.Call(m, "SetAddrs", arg0, arg1, arg2) + m.ctrl.Call(m, "SetAddrs", p, addrs, ttl) } // SetAddrs indicates an expected call of SetAddrs. -func (mr *MockPeerstoreMockRecorder) SetAddrs(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) SetAddrs(p, addrs, ttl any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddrs", reflect.TypeOf((*MockPeerstore)(nil).SetAddrs), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAddrs", reflect.TypeOf((*MockPeerstore)(nil).SetAddrs), p, addrs, ttl) } // SetProtocols mocks base method. @@ -438,13 +439,13 @@ func (mr *MockPeerstoreMockRecorder) SupportsProtocols(arg0 any, arg1 ...any) *g } // UpdateAddrs mocks base method. -func (m *MockPeerstore) UpdateAddrs(arg0 peer.ID, arg1, arg2 time.Duration) { +func (m *MockPeerstore) UpdateAddrs(p peer.ID, oldTTL, newTTL time.Duration) { m.ctrl.T.Helper() - m.ctrl.Call(m, "UpdateAddrs", arg0, arg1, arg2) + m.ctrl.Call(m, "UpdateAddrs", p, oldTTL, newTTL) } // UpdateAddrs indicates an expected call of UpdateAddrs. -func (mr *MockPeerstoreMockRecorder) UpdateAddrs(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockPeerstoreMockRecorder) UpdateAddrs(p, oldTTL, newTTL any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAddrs", reflect.TypeOf((*MockPeerstore)(nil).UpdateAddrs), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAddrs", reflect.TypeOf((*MockPeerstore)(nil).UpdateAddrs), p, oldTTL, newTTL) } diff --git a/p2p/net/nat/mock_nat_test.go b/p2p/net/nat/mock_nat_test.go index 3e453f65fa..c8023344ea 100644 --- a/p2p/net/nat/mock_nat_test.go +++ b/p2p/net/nat/mock_nat_test.go @@ -22,6 +22,7 @@ import ( type MockNAT struct { ctrl *gomock.Controller recorder *MockNATMockRecorder + isgomock struct{} } // MockNATMockRecorder is the mock recorder for MockNAT. @@ -42,32 +43,32 @@ func (m *MockNAT) EXPECT() *MockNATMockRecorder { } // AddPortMapping mocks base method. -func (m *MockNAT) AddPortMapping(arg0 context.Context, arg1 string, arg2 int, arg3 string, arg4 time.Duration) (int, error) { +func (m *MockNAT) AddPortMapping(ctx context.Context, protocol string, internalPort int, description string, timeout time.Duration) (int, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddPortMapping", arg0, arg1, arg2, arg3, arg4) + ret := m.ctrl.Call(m, "AddPortMapping", ctx, protocol, internalPort, description, timeout) ret0, _ := ret[0].(int) ret1, _ := ret[1].(error) return ret0, ret1 } // AddPortMapping indicates an expected call of AddPortMapping. -func (mr *MockNATMockRecorder) AddPortMapping(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { +func (mr *MockNATMockRecorder) AddPortMapping(ctx, protocol, internalPort, description, timeout any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPortMapping", reflect.TypeOf((*MockNAT)(nil).AddPortMapping), arg0, arg1, arg2, arg3, arg4) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddPortMapping", reflect.TypeOf((*MockNAT)(nil).AddPortMapping), ctx, protocol, internalPort, description, timeout) } // DeletePortMapping mocks base method. -func (m *MockNAT) DeletePortMapping(arg0 context.Context, arg1 string, arg2 int) error { +func (m *MockNAT) DeletePortMapping(ctx context.Context, protocol string, internalPort int) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeletePortMapping", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DeletePortMapping", ctx, protocol, internalPort) ret0, _ := ret[0].(error) return ret0 } // DeletePortMapping indicates an expected call of DeletePortMapping. -func (mr *MockNATMockRecorder) DeletePortMapping(arg0, arg1, arg2 any) *gomock.Call { +func (mr *MockNATMockRecorder) DeletePortMapping(ctx, protocol, internalPort any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePortMapping", reflect.TypeOf((*MockNAT)(nil).DeletePortMapping), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeletePortMapping", reflect.TypeOf((*MockNAT)(nil).DeletePortMapping), ctx, protocol, internalPort) } // GetDeviceAddress mocks base method. diff --git a/p2p/protocol/autonatv2/pb/autonatv2.pb.go b/p2p/protocol/autonatv2/pb/autonatv2.pb.go index 2138374c4a..3c1016fefd 100644 --- a/p2p/protocol/autonatv2/pb/autonatv2.pb.go +++ b/p2p/protocol/autonatv2/pb/autonatv2.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/protocol/autonatv2/pb/autonatv2.proto package pb @@ -183,11 +183,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -198,7 +196,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -287,11 +285,9 @@ type DialRequest struct { func (x *DialRequest) Reset() { *x = DialRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialRequest) String() string { @@ -302,7 +298,7 @@ func (*DialRequest) ProtoMessage() {} func (x *DialRequest) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -342,11 +338,9 @@ type DialDataRequest struct { func (x *DialDataRequest) Reset() { *x = DialDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialDataRequest) String() string { @@ -357,7 +351,7 @@ func (*DialDataRequest) ProtoMessage() {} func (x *DialDataRequest) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -398,11 +392,9 @@ type DialResponse struct { func (x *DialResponse) Reset() { *x = DialResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialResponse) String() string { @@ -413,7 +405,7 @@ func (*DialResponse) ProtoMessage() {} func (x *DialResponse) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -459,11 +451,9 @@ type DialDataResponse struct { func (x *DialDataResponse) Reset() { *x = DialDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialDataResponse) String() string { @@ -474,7 +464,7 @@ func (*DialDataResponse) ProtoMessage() {} func (x *DialDataResponse) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -506,11 +496,9 @@ type DialBack struct { func (x *DialBack) Reset() { *x = DialBack{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialBack) String() string { @@ -521,7 +509,7 @@ func (*DialBack) ProtoMessage() {} func (x *DialBack) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -553,11 +541,9 @@ type DialBackResponse struct { func (x *DialBackResponse) Reset() { *x = DialBackResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DialBackResponse) String() string { @@ -568,7 +554,7 @@ func (*DialBackResponse) ProtoMessage() {} func (x *DialBackResponse) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -709,92 +695,6 @@ func file_p2p_protocol_autonatv2_pb_autonatv2_proto_init() { if File_p2p_protocol_autonatv2_pb_autonatv2_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*DialRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*DialDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*DialResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*DialDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DialBack); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*DialBackResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_p2p_protocol_autonatv2_pb_autonatv2_proto_msgTypes[0].OneofWrappers = []any{ (*Message_DialRequest)(nil), (*Message_DialResponse)(nil), diff --git a/p2p/protocol/circuitv2/pb/circuit.pb.go b/p2p/protocol/circuitv2/pb/circuit.pb.go index f9cc203671..fda13bcbbc 100644 --- a/p2p/protocol/circuitv2/pb/circuit.pb.go +++ b/p2p/protocol/circuitv2/pb/circuit.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/protocol/circuitv2/pb/circuit.proto package pb @@ -199,11 +199,9 @@ type HopMessage struct { func (x *HopMessage) Reset() { *x = HopMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HopMessage) String() string { @@ -214,7 +212,7 @@ func (*HopMessage) ProtoMessage() {} func (x *HopMessage) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -279,11 +277,9 @@ type StopMessage struct { func (x *StopMessage) Reset() { *x = StopMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *StopMessage) String() string { @@ -294,7 +290,7 @@ func (*StopMessage) ProtoMessage() {} func (x *StopMessage) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -350,11 +346,9 @@ type Peer struct { func (x *Peer) Reset() { *x = Peer{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Peer) String() string { @@ -365,7 +359,7 @@ func (*Peer) ProtoMessage() {} func (x *Peer) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -408,11 +402,9 @@ type Reservation struct { func (x *Reservation) Reset() { *x = Reservation{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Reservation) String() string { @@ -423,7 +415,7 @@ func (*Reservation) ProtoMessage() {} func (x *Reservation) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -470,11 +462,9 @@ type Limit struct { func (x *Limit) Reset() { *x = Limit{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Limit) String() string { @@ -485,7 +475,7 @@ func (*Limit) ProtoMessage() {} func (x *Limit) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -643,68 +633,6 @@ func file_p2p_protocol_circuitv2_pb_circuit_proto_init() { if File_p2p_protocol_circuitv2_pb_circuit_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HopMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*StopMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Peer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*Reservation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*Limit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[0].OneofWrappers = []any{} file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[1].OneofWrappers = []any{} file_p2p_protocol_circuitv2_pb_circuit_proto_msgTypes[2].OneofWrappers = []any{} diff --git a/p2p/protocol/circuitv2/pb/voucher.pb.go b/p2p/protocol/circuitv2/pb/voucher.pb.go index 02d8f21222..5837d4de23 100644 --- a/p2p/protocol/circuitv2/pb/voucher.pb.go +++ b/p2p/protocol/circuitv2/pb/voucher.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/protocol/circuitv2/pb/voucher.proto package pb @@ -34,11 +34,9 @@ type ReservationVoucher struct { func (x *ReservationVoucher) Reset() { *x = ReservationVoucher{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ReservationVoucher) String() string { @@ -49,7 +47,7 @@ func (*ReservationVoucher) ProtoMessage() {} func (x *ReservationVoucher) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -136,20 +134,6 @@ func file_p2p_protocol_circuitv2_pb_voucher_proto_init() { if File_p2p_protocol_circuitv2_pb_voucher_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReservationVoucher); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_p2p_protocol_circuitv2_pb_voucher_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/p2p/protocol/holepunch/pb/holepunch.pb.go b/p2p/protocol/holepunch/pb/holepunch.pb.go index dde534a73b..c8ab6f16c4 100644 --- a/p2p/protocol/holepunch/pb/holepunch.pb.go +++ b/p2p/protocol/holepunch/pb/holepunch.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/protocol/holepunch/pb/holepunch.proto package pb @@ -88,11 +88,9 @@ type HolePunch struct { func (x *HolePunch) Reset() { *x = HolePunch{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *HolePunch) String() string { @@ -103,7 +101,7 @@ func (*HolePunch) ProtoMessage() {} func (x *HolePunch) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -184,20 +182,6 @@ func file_p2p_protocol_holepunch_pb_holepunch_proto_init() { if File_p2p_protocol_holepunch_pb_holepunch_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_protocol_holepunch_pb_holepunch_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*HolePunch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/p2p/protocol/identify/pb/identify.pb.go b/p2p/protocol/identify/pb/identify.pb.go index a63ae000ba..66f4cb703a 100644 --- a/p2p/protocol/identify/pb/identify.pb.go +++ b/p2p/protocol/identify/pb/identify.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/protocol/identify/pb/identify.proto package pb @@ -52,11 +52,9 @@ type Identify struct { func (x *Identify) Reset() { *x = Identify{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_protocol_identify_pb_identify_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_protocol_identify_pb_identify_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Identify) String() string { @@ -67,7 +65,7 @@ func (*Identify) ProtoMessage() {} func (x *Identify) ProtoReflect() protoreflect.Message { mi := &file_p2p_protocol_identify_pb_identify_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -189,20 +187,6 @@ func file_p2p_protocol_identify_pb_identify_proto_init() { if File_p2p_protocol_identify_pb_identify_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_protocol_identify_pb_identify_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Identify); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/p2p/security/noise/pb/payload.pb.go b/p2p/security/noise/pb/payload.pb.go index 3572d12846..45a104e222 100644 --- a/p2p/security/noise/pb/payload.pb.go +++ b/p2p/security/noise/pb/payload.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/security/noise/pb/payload.proto package pb @@ -31,11 +31,9 @@ type NoiseExtensions struct { func (x *NoiseExtensions) Reset() { *x = NoiseExtensions{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NoiseExtensions) String() string { @@ -46,7 +44,7 @@ func (*NoiseExtensions) ProtoMessage() {} func (x *NoiseExtensions) ProtoReflect() protoreflect.Message { mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -87,11 +85,9 @@ type NoiseHandshakePayload struct { func (x *NoiseHandshakePayload) Reset() { *x = NoiseHandshakePayload{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *NoiseHandshakePayload) String() string { @@ -102,7 +98,7 @@ func (*NoiseHandshakePayload) ProtoMessage() {} func (x *NoiseHandshakePayload) ProtoReflect() protoreflect.Message { mi := &file_p2p_security_noise_pb_payload_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,32 +193,6 @@ func file_p2p_security_noise_pb_payload_proto_init() { if File_p2p_security_noise_pb_payload_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_security_noise_pb_payload_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*NoiseExtensions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_p2p_security_noise_pb_payload_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*NoiseHandshakePayload); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/p2p/test/transport/mock_connection_gater_test.go b/p2p/test/transport/mock_connection_gater_test.go index d617f72fce..5e13863f54 100644 --- a/p2p/test/transport/mock_connection_gater_test.go +++ b/p2p/test/transport/mock_connection_gater_test.go @@ -23,6 +23,7 @@ import ( type MockConnectionGater struct { ctrl *gomock.Controller recorder *MockConnectionGaterMockRecorder + isgomock struct{} } // MockConnectionGaterMockRecorder is the mock recorder for MockConnectionGater. @@ -71,17 +72,17 @@ func (mr *MockConnectionGaterMockRecorder) InterceptAddrDial(arg0, arg1 any) *go } // InterceptPeerDial mocks base method. -func (m *MockConnectionGater) InterceptPeerDial(arg0 peer.ID) bool { +func (m *MockConnectionGater) InterceptPeerDial(p peer.ID) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InterceptPeerDial", arg0) + ret := m.ctrl.Call(m, "InterceptPeerDial", p) ret0, _ := ret[0].(bool) return ret0 } // InterceptPeerDial indicates an expected call of InterceptPeerDial. -func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(arg0 any) *gomock.Call { +func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterceptPeerDial", reflect.TypeOf((*MockConnectionGater)(nil).InterceptPeerDial), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterceptPeerDial", reflect.TypeOf((*MockConnectionGater)(nil).InterceptPeerDial), p) } // InterceptSecured mocks base method. diff --git a/p2p/transport/quic/mock_connection_gater_test.go b/p2p/transport/quic/mock_connection_gater_test.go index 8e23aad370..0dd3586bb6 100644 --- a/p2p/transport/quic/mock_connection_gater_test.go +++ b/p2p/transport/quic/mock_connection_gater_test.go @@ -23,6 +23,7 @@ import ( type MockConnectionGater struct { ctrl *gomock.Controller recorder *MockConnectionGaterMockRecorder + isgomock struct{} } // MockConnectionGaterMockRecorder is the mock recorder for MockConnectionGater. @@ -71,17 +72,17 @@ func (mr *MockConnectionGaterMockRecorder) InterceptAddrDial(arg0, arg1 any) *go } // InterceptPeerDial mocks base method. -func (m *MockConnectionGater) InterceptPeerDial(arg0 peer.ID) bool { +func (m *MockConnectionGater) InterceptPeerDial(p peer.ID) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InterceptPeerDial", arg0) + ret := m.ctrl.Call(m, "InterceptPeerDial", p) ret0, _ := ret[0].(bool) return ret0 } // InterceptPeerDial indicates an expected call of InterceptPeerDial. -func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(arg0 any) *gomock.Call { +func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterceptPeerDial", reflect.TypeOf((*MockConnectionGater)(nil).InterceptPeerDial), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterceptPeerDial", reflect.TypeOf((*MockConnectionGater)(nil).InterceptPeerDial), p) } // InterceptSecured mocks base method. diff --git a/p2p/transport/webrtc/pb/message.pb.go b/p2p/transport/webrtc/pb/message.pb.go index d8e68a1aa9..d7d4d583af 100644 --- a/p2p/transport/webrtc/pb/message.pb.go +++ b/p2p/transport/webrtc/pb/message.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.27.3 +// protoc-gen-go v1.35.1 +// protoc v5.28.2 // source: p2p/transport/webrtc/pb/message.proto package pb @@ -101,11 +101,9 @@ type Message struct { func (x *Message) Reset() { *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_p2p_transport_webrtc_pb_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_p2p_transport_webrtc_pb_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Message) String() string { @@ -116,7 +114,7 @@ func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { mi := &file_p2p_transport_webrtc_pb_message_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -197,20 +195,6 @@ func file_p2p_transport_webrtc_pb_message_proto_init() { if File_p2p_transport_webrtc_pb_message_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_p2p_transport_webrtc_pb_message_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/p2p/transport/webtransport/mock_connection_gater_test.go b/p2p/transport/webtransport/mock_connection_gater_test.go index 245d254fcb..d0a4747dbe 100644 --- a/p2p/transport/webtransport/mock_connection_gater_test.go +++ b/p2p/transport/webtransport/mock_connection_gater_test.go @@ -23,6 +23,7 @@ import ( type MockConnectionGater struct { ctrl *gomock.Controller recorder *MockConnectionGaterMockRecorder + isgomock struct{} } // MockConnectionGaterMockRecorder is the mock recorder for MockConnectionGater. @@ -71,17 +72,17 @@ func (mr *MockConnectionGaterMockRecorder) InterceptAddrDial(arg0, arg1 any) *go } // InterceptPeerDial mocks base method. -func (m *MockConnectionGater) InterceptPeerDial(arg0 peer.ID) bool { +func (m *MockConnectionGater) InterceptPeerDial(p peer.ID) bool { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InterceptPeerDial", arg0) + ret := m.ctrl.Call(m, "InterceptPeerDial", p) ret0, _ := ret[0].(bool) return ret0 } // InterceptPeerDial indicates an expected call of InterceptPeerDial. -func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(arg0 any) *gomock.Call { +func (mr *MockConnectionGaterMockRecorder) InterceptPeerDial(p any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterceptPeerDial", reflect.TypeOf((*MockConnectionGater)(nil).InterceptPeerDial), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InterceptPeerDial", reflect.TypeOf((*MockConnectionGater)(nil).InterceptPeerDial), p) } // InterceptSecured mocks base method.