From be58e454453ec9ddd777d3141e0a0175b243ff09 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Fri, 11 Oct 2024 17:48:37 -0400 Subject: [PATCH] gen --- .../backend/mocks/block_store.mock.go | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/mod/node-api/backend/mocks/block_store.mock.go b/mod/node-api/backend/mocks/block_store.mock.go index e19547d3e9..47ac3f3ca4 100644 --- a/mod/node-api/backend/mocks/block_store.mock.go +++ b/mod/node-api/backend/mocks/block_store.mock.go @@ -78,27 +78,27 @@ func (_c *BlockStore_GetSlotByBlockRoot_Call[BeaconBlockT]) RunAndReturn(run fun return _c } -// GetSlotByExecutionNumber provides a mock function with given fields: executionNumber -func (_m *BlockStore[BeaconBlockT]) GetSlotByExecutionNumber(executionNumber math.U64) (math.U64, error) { - ret := _m.Called(executionNumber) +// GetSlotByStateRoot provides a mock function with given fields: root +func (_m *BlockStore[BeaconBlockT]) GetSlotByStateRoot(root common.Root) (math.U64, error) { + ret := _m.Called(root) if len(ret) == 0 { - panic("no return value specified for GetSlotByExecutionNumber") + panic("no return value specified for GetSlotByStateRoot") } var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(math.U64) (math.U64, error)); ok { - return rf(executionNumber) + if rf, ok := ret.Get(0).(func(common.Root) (math.U64, error)); ok { + return rf(root) } - if rf, ok := ret.Get(0).(func(math.U64) math.U64); ok { - r0 = rf(executionNumber) + if rf, ok := ret.Get(0).(func(common.Root) math.U64); ok { + r0 = rf(root) } else { r0 = ret.Get(0).(math.U64) } - if rf, ok := ret.Get(1).(func(math.U64) error); ok { - r1 = rf(executionNumber) + if rf, ok := ret.Get(1).(func(common.Root) error); ok { + r1 = rf(root) } else { r1 = ret.Error(1) } @@ -106,55 +106,55 @@ func (_m *BlockStore[BeaconBlockT]) GetSlotByExecutionNumber(executionNumber mat return r0, r1 } -// BlockStore_GetSlotByExecutionNumber_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlotByExecutionNumber' -type BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT any] struct { +// BlockStore_GetSlotByStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlotByStateRoot' +type BlockStore_GetSlotByStateRoot_Call[BeaconBlockT any] struct { *mock.Call } -// GetSlotByExecutionNumber is a helper method to define mock.On call -// - executionNumber math.U64 -func (_e *BlockStore_Expecter[BeaconBlockT]) GetSlotByExecutionNumber(executionNumber interface{}) *BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT] { - return &BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT]{Call: _e.mock.On("GetSlotByExecutionNumber", executionNumber)} +// GetSlotByStateRoot is a helper method to define mock.On call +// - root common.Root +func (_e *BlockStore_Expecter[BeaconBlockT]) GetSlotByStateRoot(root interface{}) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { + return &BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]{Call: _e.mock.On("GetSlotByStateRoot", root)} } -func (_c *BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT]) Run(run func(executionNumber math.U64)) *BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Run(run func(root common.Root)) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(math.U64)) + run(args[0].(common.Root)) }) return _c } -func (_c *BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT]) RunAndReturn(run func(math.U64) (math.U64, error)) *BlockStore_GetSlotByExecutionNumber_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.U64, error)) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { _c.Call.Return(run) return _c } -// GetSlotByStateRoot provides a mock function with given fields: root -func (_m *BlockStore[BeaconBlockT]) GetSlotByStateRoot(root common.Root) (math.U64, error) { - ret := _m.Called(root) +// GetSlotByTimestamp provides a mock function with given fields: timestamp +func (_m *BlockStore[BeaconBlockT]) GetSlotByTimestamp(timestamp math.U64) (math.U64, error) { + ret := _m.Called(timestamp) if len(ret) == 0 { - panic("no return value specified for GetSlotByStateRoot") + panic("no return value specified for GetSlotByTimestamp") } var r0 math.U64 var r1 error - if rf, ok := ret.Get(0).(func(common.Root) (math.U64, error)); ok { - return rf(root) + if rf, ok := ret.Get(0).(func(math.U64) (math.U64, error)); ok { + return rf(timestamp) } - if rf, ok := ret.Get(0).(func(common.Root) math.U64); ok { - r0 = rf(root) + if rf, ok := ret.Get(0).(func(math.U64) math.U64); ok { + r0 = rf(timestamp) } else { r0 = ret.Get(0).(math.U64) } - if rf, ok := ret.Get(1).(func(common.Root) error); ok { - r1 = rf(root) + if rf, ok := ret.Get(1).(func(math.U64) error); ok { + r1 = rf(timestamp) } else { r1 = ret.Error(1) } @@ -162,30 +162,30 @@ func (_m *BlockStore[BeaconBlockT]) GetSlotByStateRoot(root common.Root) (math.U return r0, r1 } -// BlockStore_GetSlotByStateRoot_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlotByStateRoot' -type BlockStore_GetSlotByStateRoot_Call[BeaconBlockT any] struct { +// BlockStore_GetSlotByTimestamp_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSlotByTimestamp' +type BlockStore_GetSlotByTimestamp_Call[BeaconBlockT any] struct { *mock.Call } -// GetSlotByStateRoot is a helper method to define mock.On call -// - root common.Root -func (_e *BlockStore_Expecter[BeaconBlockT]) GetSlotByStateRoot(root interface{}) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { - return &BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]{Call: _e.mock.On("GetSlotByStateRoot", root)} +// GetSlotByTimestamp is a helper method to define mock.On call +// - timestamp math.U64 +func (_e *BlockStore_Expecter[BeaconBlockT]) GetSlotByTimestamp(timestamp interface{}) *BlockStore_GetSlotByTimestamp_Call[BeaconBlockT] { + return &BlockStore_GetSlotByTimestamp_Call[BeaconBlockT]{Call: _e.mock.On("GetSlotByTimestamp", timestamp)} } -func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Run(run func(root common.Root)) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByTimestamp_Call[BeaconBlockT]) Run(run func(timestamp math.U64)) *BlockStore_GetSlotByTimestamp_Call[BeaconBlockT] { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(common.Root)) + run(args[0].(math.U64)) }) return _c } -func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByTimestamp_Call[BeaconBlockT]) Return(_a0 math.U64, _a1 error) *BlockStore_GetSlotByTimestamp_Call[BeaconBlockT] { _c.Call.Return(_a0, _a1) return _c } -func (_c *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT]) RunAndReturn(run func(common.Root) (math.U64, error)) *BlockStore_GetSlotByStateRoot_Call[BeaconBlockT] { +func (_c *BlockStore_GetSlotByTimestamp_Call[BeaconBlockT]) RunAndReturn(run func(math.U64) (math.U64, error)) *BlockStore_GetSlotByTimestamp_Call[BeaconBlockT] { _c.Call.Return(run) return _c }