github.com/ethereum-optimism/optimism@v1.7.2/op-node/p2p/gating/mocks/BlockingConnectionGater.go (about)

     1  // Code generated by mockery v2.28.1. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	control "github.com/libp2p/go-libp2p/core/control"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	multiaddr "github.com/multiformats/go-multiaddr"
    11  
    12  	net "net"
    13  
    14  	network "github.com/libp2p/go-libp2p/core/network"
    15  
    16  	peer "github.com/libp2p/go-libp2p/core/peer"
    17  )
    18  
    19  // BlockingConnectionGater is an autogenerated mock type for the BlockingConnectionGater type
    20  type BlockingConnectionGater struct {
    21  	mock.Mock
    22  }
    23  
    24  type BlockingConnectionGater_Expecter struct {
    25  	mock *mock.Mock
    26  }
    27  
    28  func (_m *BlockingConnectionGater) EXPECT() *BlockingConnectionGater_Expecter {
    29  	return &BlockingConnectionGater_Expecter{mock: &_m.Mock}
    30  }
    31  
    32  // BlockAddr provides a mock function with given fields: ip
    33  func (_m *BlockingConnectionGater) BlockAddr(ip net.IP) error {
    34  	ret := _m.Called(ip)
    35  
    36  	var r0 error
    37  	if rf, ok := ret.Get(0).(func(net.IP) error); ok {
    38  		r0 = rf(ip)
    39  	} else {
    40  		r0 = ret.Error(0)
    41  	}
    42  
    43  	return r0
    44  }
    45  
    46  // BlockingConnectionGater_BlockAddr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockAddr'
    47  type BlockingConnectionGater_BlockAddr_Call struct {
    48  	*mock.Call
    49  }
    50  
    51  // BlockAddr is a helper method to define mock.On call
    52  //   - ip net.IP
    53  func (_e *BlockingConnectionGater_Expecter) BlockAddr(ip interface{}) *BlockingConnectionGater_BlockAddr_Call {
    54  	return &BlockingConnectionGater_BlockAddr_Call{Call: _e.mock.On("BlockAddr", ip)}
    55  }
    56  
    57  func (_c *BlockingConnectionGater_BlockAddr_Call) Run(run func(ip net.IP)) *BlockingConnectionGater_BlockAddr_Call {
    58  	_c.Call.Run(func(args mock.Arguments) {
    59  		run(args[0].(net.IP))
    60  	})
    61  	return _c
    62  }
    63  
    64  func (_c *BlockingConnectionGater_BlockAddr_Call) Return(_a0 error) *BlockingConnectionGater_BlockAddr_Call {
    65  	_c.Call.Return(_a0)
    66  	return _c
    67  }
    68  
    69  func (_c *BlockingConnectionGater_BlockAddr_Call) RunAndReturn(run func(net.IP) error) *BlockingConnectionGater_BlockAddr_Call {
    70  	_c.Call.Return(run)
    71  	return _c
    72  }
    73  
    74  // BlockPeer provides a mock function with given fields: p
    75  func (_m *BlockingConnectionGater) BlockPeer(p peer.ID) error {
    76  	ret := _m.Called(p)
    77  
    78  	var r0 error
    79  	if rf, ok := ret.Get(0).(func(peer.ID) error); ok {
    80  		r0 = rf(p)
    81  	} else {
    82  		r0 = ret.Error(0)
    83  	}
    84  
    85  	return r0
    86  }
    87  
    88  // BlockingConnectionGater_BlockPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockPeer'
    89  type BlockingConnectionGater_BlockPeer_Call struct {
    90  	*mock.Call
    91  }
    92  
    93  // BlockPeer is a helper method to define mock.On call
    94  //   - p peer.ID
    95  func (_e *BlockingConnectionGater_Expecter) BlockPeer(p interface{}) *BlockingConnectionGater_BlockPeer_Call {
    96  	return &BlockingConnectionGater_BlockPeer_Call{Call: _e.mock.On("BlockPeer", p)}
    97  }
    98  
    99  func (_c *BlockingConnectionGater_BlockPeer_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_BlockPeer_Call {
   100  	_c.Call.Run(func(args mock.Arguments) {
   101  		run(args[0].(peer.ID))
   102  	})
   103  	return _c
   104  }
   105  
   106  func (_c *BlockingConnectionGater_BlockPeer_Call) Return(_a0 error) *BlockingConnectionGater_BlockPeer_Call {
   107  	_c.Call.Return(_a0)
   108  	return _c
   109  }
   110  
   111  func (_c *BlockingConnectionGater_BlockPeer_Call) RunAndReturn(run func(peer.ID) error) *BlockingConnectionGater_BlockPeer_Call {
   112  	_c.Call.Return(run)
   113  	return _c
   114  }
   115  
   116  // BlockSubnet provides a mock function with given fields: ipnet
   117  func (_m *BlockingConnectionGater) BlockSubnet(ipnet *net.IPNet) error {
   118  	ret := _m.Called(ipnet)
   119  
   120  	var r0 error
   121  	if rf, ok := ret.Get(0).(func(*net.IPNet) error); ok {
   122  		r0 = rf(ipnet)
   123  	} else {
   124  		r0 = ret.Error(0)
   125  	}
   126  
   127  	return r0
   128  }
   129  
   130  // BlockingConnectionGater_BlockSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockSubnet'
   131  type BlockingConnectionGater_BlockSubnet_Call struct {
   132  	*mock.Call
   133  }
   134  
   135  // BlockSubnet is a helper method to define mock.On call
   136  //   - ipnet *net.IPNet
   137  func (_e *BlockingConnectionGater_Expecter) BlockSubnet(ipnet interface{}) *BlockingConnectionGater_BlockSubnet_Call {
   138  	return &BlockingConnectionGater_BlockSubnet_Call{Call: _e.mock.On("BlockSubnet", ipnet)}
   139  }
   140  
   141  func (_c *BlockingConnectionGater_BlockSubnet_Call) Run(run func(ipnet *net.IPNet)) *BlockingConnectionGater_BlockSubnet_Call {
   142  	_c.Call.Run(func(args mock.Arguments) {
   143  		run(args[0].(*net.IPNet))
   144  	})
   145  	return _c
   146  }
   147  
   148  func (_c *BlockingConnectionGater_BlockSubnet_Call) Return(_a0 error) *BlockingConnectionGater_BlockSubnet_Call {
   149  	_c.Call.Return(_a0)
   150  	return _c
   151  }
   152  
   153  func (_c *BlockingConnectionGater_BlockSubnet_Call) RunAndReturn(run func(*net.IPNet) error) *BlockingConnectionGater_BlockSubnet_Call {
   154  	_c.Call.Return(run)
   155  	return _c
   156  }
   157  
   158  // InterceptAccept provides a mock function with given fields: _a0
   159  func (_m *BlockingConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool {
   160  	ret := _m.Called(_a0)
   161  
   162  	var r0 bool
   163  	if rf, ok := ret.Get(0).(func(network.ConnMultiaddrs) bool); ok {
   164  		r0 = rf(_a0)
   165  	} else {
   166  		r0 = ret.Get(0).(bool)
   167  	}
   168  
   169  	return r0
   170  }
   171  
   172  // BlockingConnectionGater_InterceptAccept_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptAccept'
   173  type BlockingConnectionGater_InterceptAccept_Call struct {
   174  	*mock.Call
   175  }
   176  
   177  // InterceptAccept is a helper method to define mock.On call
   178  //   - _a0 network.ConnMultiaddrs
   179  func (_e *BlockingConnectionGater_Expecter) InterceptAccept(_a0 interface{}) *BlockingConnectionGater_InterceptAccept_Call {
   180  	return &BlockingConnectionGater_InterceptAccept_Call{Call: _e.mock.On("InterceptAccept", _a0)}
   181  }
   182  
   183  func (_c *BlockingConnectionGater_InterceptAccept_Call) Run(run func(_a0 network.ConnMultiaddrs)) *BlockingConnectionGater_InterceptAccept_Call {
   184  	_c.Call.Run(func(args mock.Arguments) {
   185  		run(args[0].(network.ConnMultiaddrs))
   186  	})
   187  	return _c
   188  }
   189  
   190  func (_c *BlockingConnectionGater_InterceptAccept_Call) Return(allow bool) *BlockingConnectionGater_InterceptAccept_Call {
   191  	_c.Call.Return(allow)
   192  	return _c
   193  }
   194  
   195  func (_c *BlockingConnectionGater_InterceptAccept_Call) RunAndReturn(run func(network.ConnMultiaddrs) bool) *BlockingConnectionGater_InterceptAccept_Call {
   196  	_c.Call.Return(run)
   197  	return _c
   198  }
   199  
   200  // InterceptAddrDial provides a mock function with given fields: _a0, _a1
   201  func (_m *BlockingConnectionGater) InterceptAddrDial(_a0 peer.ID, _a1 multiaddr.Multiaddr) bool {
   202  	ret := _m.Called(_a0, _a1)
   203  
   204  	var r0 bool
   205  	if rf, ok := ret.Get(0).(func(peer.ID, multiaddr.Multiaddr) bool); ok {
   206  		r0 = rf(_a0, _a1)
   207  	} else {
   208  		r0 = ret.Get(0).(bool)
   209  	}
   210  
   211  	return r0
   212  }
   213  
   214  // BlockingConnectionGater_InterceptAddrDial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptAddrDial'
   215  type BlockingConnectionGater_InterceptAddrDial_Call struct {
   216  	*mock.Call
   217  }
   218  
   219  // InterceptAddrDial is a helper method to define mock.On call
   220  //   - _a0 peer.ID
   221  //   - _a1 multiaddr.Multiaddr
   222  func (_e *BlockingConnectionGater_Expecter) InterceptAddrDial(_a0 interface{}, _a1 interface{}) *BlockingConnectionGater_InterceptAddrDial_Call {
   223  	return &BlockingConnectionGater_InterceptAddrDial_Call{Call: _e.mock.On("InterceptAddrDial", _a0, _a1)}
   224  }
   225  
   226  func (_c *BlockingConnectionGater_InterceptAddrDial_Call) Run(run func(_a0 peer.ID, _a1 multiaddr.Multiaddr)) *BlockingConnectionGater_InterceptAddrDial_Call {
   227  	_c.Call.Run(func(args mock.Arguments) {
   228  		run(args[0].(peer.ID), args[1].(multiaddr.Multiaddr))
   229  	})
   230  	return _c
   231  }
   232  
   233  func (_c *BlockingConnectionGater_InterceptAddrDial_Call) Return(allow bool) *BlockingConnectionGater_InterceptAddrDial_Call {
   234  	_c.Call.Return(allow)
   235  	return _c
   236  }
   237  
   238  func (_c *BlockingConnectionGater_InterceptAddrDial_Call) RunAndReturn(run func(peer.ID, multiaddr.Multiaddr) bool) *BlockingConnectionGater_InterceptAddrDial_Call {
   239  	_c.Call.Return(run)
   240  	return _c
   241  }
   242  
   243  // InterceptPeerDial provides a mock function with given fields: p
   244  func (_m *BlockingConnectionGater) InterceptPeerDial(p peer.ID) bool {
   245  	ret := _m.Called(p)
   246  
   247  	var r0 bool
   248  	if rf, ok := ret.Get(0).(func(peer.ID) bool); ok {
   249  		r0 = rf(p)
   250  	} else {
   251  		r0 = ret.Get(0).(bool)
   252  	}
   253  
   254  	return r0
   255  }
   256  
   257  // BlockingConnectionGater_InterceptPeerDial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptPeerDial'
   258  type BlockingConnectionGater_InterceptPeerDial_Call struct {
   259  	*mock.Call
   260  }
   261  
   262  // InterceptPeerDial is a helper method to define mock.On call
   263  //   - p peer.ID
   264  func (_e *BlockingConnectionGater_Expecter) InterceptPeerDial(p interface{}) *BlockingConnectionGater_InterceptPeerDial_Call {
   265  	return &BlockingConnectionGater_InterceptPeerDial_Call{Call: _e.mock.On("InterceptPeerDial", p)}
   266  }
   267  
   268  func (_c *BlockingConnectionGater_InterceptPeerDial_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_InterceptPeerDial_Call {
   269  	_c.Call.Run(func(args mock.Arguments) {
   270  		run(args[0].(peer.ID))
   271  	})
   272  	return _c
   273  }
   274  
   275  func (_c *BlockingConnectionGater_InterceptPeerDial_Call) Return(allow bool) *BlockingConnectionGater_InterceptPeerDial_Call {
   276  	_c.Call.Return(allow)
   277  	return _c
   278  }
   279  
   280  func (_c *BlockingConnectionGater_InterceptPeerDial_Call) RunAndReturn(run func(peer.ID) bool) *BlockingConnectionGater_InterceptPeerDial_Call {
   281  	_c.Call.Return(run)
   282  	return _c
   283  }
   284  
   285  // InterceptSecured provides a mock function with given fields: _a0, _a1, _a2
   286  func (_m *BlockingConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs) bool {
   287  	ret := _m.Called(_a0, _a1, _a2)
   288  
   289  	var r0 bool
   290  	if rf, ok := ret.Get(0).(func(network.Direction, peer.ID, network.ConnMultiaddrs) bool); ok {
   291  		r0 = rf(_a0, _a1, _a2)
   292  	} else {
   293  		r0 = ret.Get(0).(bool)
   294  	}
   295  
   296  	return r0
   297  }
   298  
   299  // BlockingConnectionGater_InterceptSecured_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptSecured'
   300  type BlockingConnectionGater_InterceptSecured_Call struct {
   301  	*mock.Call
   302  }
   303  
   304  // InterceptSecured is a helper method to define mock.On call
   305  //   - _a0 network.Direction
   306  //   - _a1 peer.ID
   307  //   - _a2 network.ConnMultiaddrs
   308  func (_e *BlockingConnectionGater_Expecter) InterceptSecured(_a0 interface{}, _a1 interface{}, _a2 interface{}) *BlockingConnectionGater_InterceptSecured_Call {
   309  	return &BlockingConnectionGater_InterceptSecured_Call{Call: _e.mock.On("InterceptSecured", _a0, _a1, _a2)}
   310  }
   311  
   312  func (_c *BlockingConnectionGater_InterceptSecured_Call) Run(run func(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs)) *BlockingConnectionGater_InterceptSecured_Call {
   313  	_c.Call.Run(func(args mock.Arguments) {
   314  		run(args[0].(network.Direction), args[1].(peer.ID), args[2].(network.ConnMultiaddrs))
   315  	})
   316  	return _c
   317  }
   318  
   319  func (_c *BlockingConnectionGater_InterceptSecured_Call) Return(allow bool) *BlockingConnectionGater_InterceptSecured_Call {
   320  	_c.Call.Return(allow)
   321  	return _c
   322  }
   323  
   324  func (_c *BlockingConnectionGater_InterceptSecured_Call) RunAndReturn(run func(network.Direction, peer.ID, network.ConnMultiaddrs) bool) *BlockingConnectionGater_InterceptSecured_Call {
   325  	_c.Call.Return(run)
   326  	return _c
   327  }
   328  
   329  // InterceptUpgraded provides a mock function with given fields: _a0
   330  func (_m *BlockingConnectionGater) InterceptUpgraded(_a0 network.Conn) (bool, control.DisconnectReason) {
   331  	ret := _m.Called(_a0)
   332  
   333  	var r0 bool
   334  	var r1 control.DisconnectReason
   335  	if rf, ok := ret.Get(0).(func(network.Conn) (bool, control.DisconnectReason)); ok {
   336  		return rf(_a0)
   337  	}
   338  	if rf, ok := ret.Get(0).(func(network.Conn) bool); ok {
   339  		r0 = rf(_a0)
   340  	} else {
   341  		r0 = ret.Get(0).(bool)
   342  	}
   343  
   344  	if rf, ok := ret.Get(1).(func(network.Conn) control.DisconnectReason); ok {
   345  		r1 = rf(_a0)
   346  	} else {
   347  		r1 = ret.Get(1).(control.DisconnectReason)
   348  	}
   349  
   350  	return r0, r1
   351  }
   352  
   353  // BlockingConnectionGater_InterceptUpgraded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptUpgraded'
   354  type BlockingConnectionGater_InterceptUpgraded_Call struct {
   355  	*mock.Call
   356  }
   357  
   358  // InterceptUpgraded is a helper method to define mock.On call
   359  //   - _a0 network.Conn
   360  func (_e *BlockingConnectionGater_Expecter) InterceptUpgraded(_a0 interface{}) *BlockingConnectionGater_InterceptUpgraded_Call {
   361  	return &BlockingConnectionGater_InterceptUpgraded_Call{Call: _e.mock.On("InterceptUpgraded", _a0)}
   362  }
   363  
   364  func (_c *BlockingConnectionGater_InterceptUpgraded_Call) Run(run func(_a0 network.Conn)) *BlockingConnectionGater_InterceptUpgraded_Call {
   365  	_c.Call.Run(func(args mock.Arguments) {
   366  		run(args[0].(network.Conn))
   367  	})
   368  	return _c
   369  }
   370  
   371  func (_c *BlockingConnectionGater_InterceptUpgraded_Call) Return(allow bool, reason control.DisconnectReason) *BlockingConnectionGater_InterceptUpgraded_Call {
   372  	_c.Call.Return(allow, reason)
   373  	return _c
   374  }
   375  
   376  func (_c *BlockingConnectionGater_InterceptUpgraded_Call) RunAndReturn(run func(network.Conn) (bool, control.DisconnectReason)) *BlockingConnectionGater_InterceptUpgraded_Call {
   377  	_c.Call.Return(run)
   378  	return _c
   379  }
   380  
   381  // ListBlockedAddrs provides a mock function with given fields:
   382  func (_m *BlockingConnectionGater) ListBlockedAddrs() []net.IP {
   383  	ret := _m.Called()
   384  
   385  	var r0 []net.IP
   386  	if rf, ok := ret.Get(0).(func() []net.IP); ok {
   387  		r0 = rf()
   388  	} else {
   389  		if ret.Get(0) != nil {
   390  			r0 = ret.Get(0).([]net.IP)
   391  		}
   392  	}
   393  
   394  	return r0
   395  }
   396  
   397  // BlockingConnectionGater_ListBlockedAddrs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedAddrs'
   398  type BlockingConnectionGater_ListBlockedAddrs_Call struct {
   399  	*mock.Call
   400  }
   401  
   402  // ListBlockedAddrs is a helper method to define mock.On call
   403  func (_e *BlockingConnectionGater_Expecter) ListBlockedAddrs() *BlockingConnectionGater_ListBlockedAddrs_Call {
   404  	return &BlockingConnectionGater_ListBlockedAddrs_Call{Call: _e.mock.On("ListBlockedAddrs")}
   405  }
   406  
   407  func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) Run(run func()) *BlockingConnectionGater_ListBlockedAddrs_Call {
   408  	_c.Call.Run(func(args mock.Arguments) {
   409  		run()
   410  	})
   411  	return _c
   412  }
   413  
   414  func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) Return(_a0 []net.IP) *BlockingConnectionGater_ListBlockedAddrs_Call {
   415  	_c.Call.Return(_a0)
   416  	return _c
   417  }
   418  
   419  func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) RunAndReturn(run func() []net.IP) *BlockingConnectionGater_ListBlockedAddrs_Call {
   420  	_c.Call.Return(run)
   421  	return _c
   422  }
   423  
   424  // ListBlockedPeers provides a mock function with given fields:
   425  func (_m *BlockingConnectionGater) ListBlockedPeers() []peer.ID {
   426  	ret := _m.Called()
   427  
   428  	var r0 []peer.ID
   429  	if rf, ok := ret.Get(0).(func() []peer.ID); ok {
   430  		r0 = rf()
   431  	} else {
   432  		if ret.Get(0) != nil {
   433  			r0 = ret.Get(0).([]peer.ID)
   434  		}
   435  	}
   436  
   437  	return r0
   438  }
   439  
   440  // BlockingConnectionGater_ListBlockedPeers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedPeers'
   441  type BlockingConnectionGater_ListBlockedPeers_Call struct {
   442  	*mock.Call
   443  }
   444  
   445  // ListBlockedPeers is a helper method to define mock.On call
   446  func (_e *BlockingConnectionGater_Expecter) ListBlockedPeers() *BlockingConnectionGater_ListBlockedPeers_Call {
   447  	return &BlockingConnectionGater_ListBlockedPeers_Call{Call: _e.mock.On("ListBlockedPeers")}
   448  }
   449  
   450  func (_c *BlockingConnectionGater_ListBlockedPeers_Call) Run(run func()) *BlockingConnectionGater_ListBlockedPeers_Call {
   451  	_c.Call.Run(func(args mock.Arguments) {
   452  		run()
   453  	})
   454  	return _c
   455  }
   456  
   457  func (_c *BlockingConnectionGater_ListBlockedPeers_Call) Return(_a0 []peer.ID) *BlockingConnectionGater_ListBlockedPeers_Call {
   458  	_c.Call.Return(_a0)
   459  	return _c
   460  }
   461  
   462  func (_c *BlockingConnectionGater_ListBlockedPeers_Call) RunAndReturn(run func() []peer.ID) *BlockingConnectionGater_ListBlockedPeers_Call {
   463  	_c.Call.Return(run)
   464  	return _c
   465  }
   466  
   467  // ListBlockedSubnets provides a mock function with given fields:
   468  func (_m *BlockingConnectionGater) ListBlockedSubnets() []*net.IPNet {
   469  	ret := _m.Called()
   470  
   471  	var r0 []*net.IPNet
   472  	if rf, ok := ret.Get(0).(func() []*net.IPNet); ok {
   473  		r0 = rf()
   474  	} else {
   475  		if ret.Get(0) != nil {
   476  			r0 = ret.Get(0).([]*net.IPNet)
   477  		}
   478  	}
   479  
   480  	return r0
   481  }
   482  
   483  // BlockingConnectionGater_ListBlockedSubnets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedSubnets'
   484  type BlockingConnectionGater_ListBlockedSubnets_Call struct {
   485  	*mock.Call
   486  }
   487  
   488  // ListBlockedSubnets is a helper method to define mock.On call
   489  func (_e *BlockingConnectionGater_Expecter) ListBlockedSubnets() *BlockingConnectionGater_ListBlockedSubnets_Call {
   490  	return &BlockingConnectionGater_ListBlockedSubnets_Call{Call: _e.mock.On("ListBlockedSubnets")}
   491  }
   492  
   493  func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) Run(run func()) *BlockingConnectionGater_ListBlockedSubnets_Call {
   494  	_c.Call.Run(func(args mock.Arguments) {
   495  		run()
   496  	})
   497  	return _c
   498  }
   499  
   500  func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) Return(_a0 []*net.IPNet) *BlockingConnectionGater_ListBlockedSubnets_Call {
   501  	_c.Call.Return(_a0)
   502  	return _c
   503  }
   504  
   505  func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) RunAndReturn(run func() []*net.IPNet) *BlockingConnectionGater_ListBlockedSubnets_Call {
   506  	_c.Call.Return(run)
   507  	return _c
   508  }
   509  
   510  // UnblockAddr provides a mock function with given fields: ip
   511  func (_m *BlockingConnectionGater) UnblockAddr(ip net.IP) error {
   512  	ret := _m.Called(ip)
   513  
   514  	var r0 error
   515  	if rf, ok := ret.Get(0).(func(net.IP) error); ok {
   516  		r0 = rf(ip)
   517  	} else {
   518  		r0 = ret.Error(0)
   519  	}
   520  
   521  	return r0
   522  }
   523  
   524  // BlockingConnectionGater_UnblockAddr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockAddr'
   525  type BlockingConnectionGater_UnblockAddr_Call struct {
   526  	*mock.Call
   527  }
   528  
   529  // UnblockAddr is a helper method to define mock.On call
   530  //   - ip net.IP
   531  func (_e *BlockingConnectionGater_Expecter) UnblockAddr(ip interface{}) *BlockingConnectionGater_UnblockAddr_Call {
   532  	return &BlockingConnectionGater_UnblockAddr_Call{Call: _e.mock.On("UnblockAddr", ip)}
   533  }
   534  
   535  func (_c *BlockingConnectionGater_UnblockAddr_Call) Run(run func(ip net.IP)) *BlockingConnectionGater_UnblockAddr_Call {
   536  	_c.Call.Run(func(args mock.Arguments) {
   537  		run(args[0].(net.IP))
   538  	})
   539  	return _c
   540  }
   541  
   542  func (_c *BlockingConnectionGater_UnblockAddr_Call) Return(_a0 error) *BlockingConnectionGater_UnblockAddr_Call {
   543  	_c.Call.Return(_a0)
   544  	return _c
   545  }
   546  
   547  func (_c *BlockingConnectionGater_UnblockAddr_Call) RunAndReturn(run func(net.IP) error) *BlockingConnectionGater_UnblockAddr_Call {
   548  	_c.Call.Return(run)
   549  	return _c
   550  }
   551  
   552  // UnblockPeer provides a mock function with given fields: p
   553  func (_m *BlockingConnectionGater) UnblockPeer(p peer.ID) error {
   554  	ret := _m.Called(p)
   555  
   556  	var r0 error
   557  	if rf, ok := ret.Get(0).(func(peer.ID) error); ok {
   558  		r0 = rf(p)
   559  	} else {
   560  		r0 = ret.Error(0)
   561  	}
   562  
   563  	return r0
   564  }
   565  
   566  // BlockingConnectionGater_UnblockPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockPeer'
   567  type BlockingConnectionGater_UnblockPeer_Call struct {
   568  	*mock.Call
   569  }
   570  
   571  // UnblockPeer is a helper method to define mock.On call
   572  //   - p peer.ID
   573  func (_e *BlockingConnectionGater_Expecter) UnblockPeer(p interface{}) *BlockingConnectionGater_UnblockPeer_Call {
   574  	return &BlockingConnectionGater_UnblockPeer_Call{Call: _e.mock.On("UnblockPeer", p)}
   575  }
   576  
   577  func (_c *BlockingConnectionGater_UnblockPeer_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_UnblockPeer_Call {
   578  	_c.Call.Run(func(args mock.Arguments) {
   579  		run(args[0].(peer.ID))
   580  	})
   581  	return _c
   582  }
   583  
   584  func (_c *BlockingConnectionGater_UnblockPeer_Call) Return(_a0 error) *BlockingConnectionGater_UnblockPeer_Call {
   585  	_c.Call.Return(_a0)
   586  	return _c
   587  }
   588  
   589  func (_c *BlockingConnectionGater_UnblockPeer_Call) RunAndReturn(run func(peer.ID) error) *BlockingConnectionGater_UnblockPeer_Call {
   590  	_c.Call.Return(run)
   591  	return _c
   592  }
   593  
   594  // UnblockSubnet provides a mock function with given fields: ipnet
   595  func (_m *BlockingConnectionGater) UnblockSubnet(ipnet *net.IPNet) error {
   596  	ret := _m.Called(ipnet)
   597  
   598  	var r0 error
   599  	if rf, ok := ret.Get(0).(func(*net.IPNet) error); ok {
   600  		r0 = rf(ipnet)
   601  	} else {
   602  		r0 = ret.Error(0)
   603  	}
   604  
   605  	return r0
   606  }
   607  
   608  // BlockingConnectionGater_UnblockSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockSubnet'
   609  type BlockingConnectionGater_UnblockSubnet_Call struct {
   610  	*mock.Call
   611  }
   612  
   613  // UnblockSubnet is a helper method to define mock.On call
   614  //   - ipnet *net.IPNet
   615  func (_e *BlockingConnectionGater_Expecter) UnblockSubnet(ipnet interface{}) *BlockingConnectionGater_UnblockSubnet_Call {
   616  	return &BlockingConnectionGater_UnblockSubnet_Call{Call: _e.mock.On("UnblockSubnet", ipnet)}
   617  }
   618  
   619  func (_c *BlockingConnectionGater_UnblockSubnet_Call) Run(run func(ipnet *net.IPNet)) *BlockingConnectionGater_UnblockSubnet_Call {
   620  	_c.Call.Run(func(args mock.Arguments) {
   621  		run(args[0].(*net.IPNet))
   622  	})
   623  	return _c
   624  }
   625  
   626  func (_c *BlockingConnectionGater_UnblockSubnet_Call) Return(_a0 error) *BlockingConnectionGater_UnblockSubnet_Call {
   627  	_c.Call.Return(_a0)
   628  	return _c
   629  }
   630  
   631  func (_c *BlockingConnectionGater_UnblockSubnet_Call) RunAndReturn(run func(*net.IPNet) error) *BlockingConnectionGater_UnblockSubnet_Call {
   632  	_c.Call.Return(run)
   633  	return _c
   634  }
   635  
   636  type mockConstructorTestingTNewBlockingConnectionGater interface {
   637  	mock.TestingT
   638  	Cleanup(func())
   639  }
   640  
   641  // NewBlockingConnectionGater creates a new instance of BlockingConnectionGater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   642  func NewBlockingConnectionGater(t mockConstructorTestingTNewBlockingConnectionGater) *BlockingConnectionGater {
   643  	mock := &BlockingConnectionGater{}
   644  	mock.Mock.Test(t)
   645  
   646  	t.Cleanup(func() { mock.AssertExpectations(t) })
   647  
   648  	return mock
   649  }