You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.2 KiB

  1. package statesync
  2. import (
  3. "context"
  4. "time"
  5. mock "github.com/stretchr/testify/mock"
  6. state "github.com/tendermint/tendermint/state"
  7. )
  8. // MockSyncReactor is an autogenerated mock type for the SyncReactor type.
  9. // Because of the stateprovider uses in Sync(), we use package statesync instead of mocks.
  10. type MockSyncReactor struct {
  11. mock.Mock
  12. }
  13. // Backfill provides a mock function with given fields: _a0
  14. func (_m *MockSyncReactor) Backfill(_a0 state.State) error {
  15. ret := _m.Called(_a0)
  16. var r0 error
  17. if rf, ok := ret.Get(0).(func(state.State) error); ok {
  18. r0 = rf(_a0)
  19. } else {
  20. r0 = ret.Error(0)
  21. }
  22. return r0
  23. }
  24. // Sync provides a mock function with given fields: _a0, _a1, _a2
  25. func (_m *MockSyncReactor) Sync(_a0 context.Context, _a1 StateProvider, _a2 time.Duration) (state.State, error) {
  26. ret := _m.Called(_a0, _a1, _a2)
  27. var r0 state.State
  28. if rf, ok := ret.Get(0).(func(context.Context, StateProvider, time.Duration) state.State); ok {
  29. r0 = rf(_a0, _a1, _a2)
  30. } else {
  31. r0 = ret.Get(0).(state.State)
  32. }
  33. var r1 error
  34. if rf, ok := ret.Get(1).(func(context.Context, StateProvider, time.Duration) error); ok {
  35. r1 = rf(_a0, _a1, _a2)
  36. } else {
  37. r1 = ret.Error(1)
  38. }
  39. return r0, r1
  40. }