github.com/ethereum-optimism/optimism@v1.7.2/op-node/p2p/mocks/PeerGater.go (about) 1 // Code generated by mockery v2.22.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 peer "github.com/libp2p/go-libp2p/core/peer" 9 ) 10 11 // PeerGater is an autogenerated mock type for the PeerGater type 12 type PeerGater struct { 13 mock.Mock 14 } 15 16 // IsBlocked provides a mock function with given fields: _a0 17 func (_m *PeerGater) IsBlocked(_a0 peer.ID) bool { 18 ret := _m.Called(_a0) 19 20 var r0 bool 21 if rf, ok := ret.Get(0).(func(peer.ID) bool); ok { 22 r0 = rf(_a0) 23 } else { 24 r0 = ret.Get(0).(bool) 25 } 26 27 return r0 28 } 29 30 // Update provides a mock function with given fields: _a0, _a1 31 func (_m *PeerGater) Update(_a0 peer.ID, _a1 float64) { 32 _m.Called(_a0, _a1) 33 } 34 35 type mockConstructorTestingTNewPeerGater interface { 36 mock.TestingT 37 Cleanup(func()) 38 } 39 40 // NewPeerGater creates a new instance of PeerGater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 41 func NewPeerGater(t mockConstructorTestingTNewPeerGater) *PeerGater { 42 mock := &PeerGater{} 43 mock.Mock.Test(t) 44 45 t.Cleanup(func() { mock.AssertExpectations(t) }) 46 47 return mock 48 }