github.com/MetalBlockchain/metalgo@v1.11.9/snow/engine/snowman/block/mock_chain_vm.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/MetalBlockchain/metalgo/snow/engine/snowman/block (interfaces: ChainVM)
     3  //
     4  // Generated by this command:
     5  //
     6  //	mockgen -package=block -destination=snow/engine/snowman/block/mock_chain_vm.go github.com/MetalBlockchain/metalgo/snow/engine/snowman/block ChainVM
     7  //
     8  
     9  // Package block is a generated GoMock package.
    10  package block
    11  
    12  import (
    13  	context "context"
    14  	http "net/http"
    15  	reflect "reflect"
    16  	time "time"
    17  
    18  	database "github.com/MetalBlockchain/metalgo/database"
    19  	ids "github.com/MetalBlockchain/metalgo/ids"
    20  	snow "github.com/MetalBlockchain/metalgo/snow"
    21  	snowman "github.com/MetalBlockchain/metalgo/snow/consensus/snowman"
    22  	common "github.com/MetalBlockchain/metalgo/snow/engine/common"
    23  	version "github.com/MetalBlockchain/metalgo/version"
    24  	gomock "go.uber.org/mock/gomock"
    25  )
    26  
    27  // MockChainVM is a mock of ChainVM interface.
    28  type MockChainVM struct {
    29  	ctrl     *gomock.Controller
    30  	recorder *MockChainVMMockRecorder
    31  }
    32  
    33  // MockChainVMMockRecorder is the mock recorder for MockChainVM.
    34  type MockChainVMMockRecorder struct {
    35  	mock *MockChainVM
    36  }
    37  
    38  // NewMockChainVM creates a new mock instance.
    39  func NewMockChainVM(ctrl *gomock.Controller) *MockChainVM {
    40  	mock := &MockChainVM{ctrl: ctrl}
    41  	mock.recorder = &MockChainVMMockRecorder{mock}
    42  	return mock
    43  }
    44  
    45  // EXPECT returns an object that allows the caller to indicate expected use.
    46  func (m *MockChainVM) EXPECT() *MockChainVMMockRecorder {
    47  	return m.recorder
    48  }
    49  
    50  // AppGossip mocks base method.
    51  func (m *MockChainVM) AppGossip(arg0 context.Context, arg1 ids.NodeID, arg2 []byte) error {
    52  	m.ctrl.T.Helper()
    53  	ret := m.ctrl.Call(m, "AppGossip", arg0, arg1, arg2)
    54  	ret0, _ := ret[0].(error)
    55  	return ret0
    56  }
    57  
    58  // AppGossip indicates an expected call of AppGossip.
    59  func (mr *MockChainVMMockRecorder) AppGossip(arg0, arg1, arg2 any) *gomock.Call {
    60  	mr.mock.ctrl.T.Helper()
    61  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppGossip", reflect.TypeOf((*MockChainVM)(nil).AppGossip), arg0, arg1, arg2)
    62  }
    63  
    64  // AppRequest mocks base method.
    65  func (m *MockChainVM) AppRequest(arg0 context.Context, arg1 ids.NodeID, arg2 uint32, arg3 time.Time, arg4 []byte) error {
    66  	m.ctrl.T.Helper()
    67  	ret := m.ctrl.Call(m, "AppRequest", arg0, arg1, arg2, arg3, arg4)
    68  	ret0, _ := ret[0].(error)
    69  	return ret0
    70  }
    71  
    72  // AppRequest indicates an expected call of AppRequest.
    73  func (mr *MockChainVMMockRecorder) AppRequest(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
    74  	mr.mock.ctrl.T.Helper()
    75  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppRequest", reflect.TypeOf((*MockChainVM)(nil).AppRequest), arg0, arg1, arg2, arg3, arg4)
    76  }
    77  
    78  // AppRequestFailed mocks base method.
    79  func (m *MockChainVM) AppRequestFailed(arg0 context.Context, arg1 ids.NodeID, arg2 uint32, arg3 *common.AppError) error {
    80  	m.ctrl.T.Helper()
    81  	ret := m.ctrl.Call(m, "AppRequestFailed", arg0, arg1, arg2, arg3)
    82  	ret0, _ := ret[0].(error)
    83  	return ret0
    84  }
    85  
    86  // AppRequestFailed indicates an expected call of AppRequestFailed.
    87  func (mr *MockChainVMMockRecorder) AppRequestFailed(arg0, arg1, arg2, arg3 any) *gomock.Call {
    88  	mr.mock.ctrl.T.Helper()
    89  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppRequestFailed", reflect.TypeOf((*MockChainVM)(nil).AppRequestFailed), arg0, arg1, arg2, arg3)
    90  }
    91  
    92  // AppResponse mocks base method.
    93  func (m *MockChainVM) AppResponse(arg0 context.Context, arg1 ids.NodeID, arg2 uint32, arg3 []byte) error {
    94  	m.ctrl.T.Helper()
    95  	ret := m.ctrl.Call(m, "AppResponse", arg0, arg1, arg2, arg3)
    96  	ret0, _ := ret[0].(error)
    97  	return ret0
    98  }
    99  
   100  // AppResponse indicates an expected call of AppResponse.
   101  func (mr *MockChainVMMockRecorder) AppResponse(arg0, arg1, arg2, arg3 any) *gomock.Call {
   102  	mr.mock.ctrl.T.Helper()
   103  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AppResponse", reflect.TypeOf((*MockChainVM)(nil).AppResponse), arg0, arg1, arg2, arg3)
   104  }
   105  
   106  // BuildBlock mocks base method.
   107  func (m *MockChainVM) BuildBlock(arg0 context.Context) (snowman.Block, error) {
   108  	m.ctrl.T.Helper()
   109  	ret := m.ctrl.Call(m, "BuildBlock", arg0)
   110  	ret0, _ := ret[0].(snowman.Block)
   111  	ret1, _ := ret[1].(error)
   112  	return ret0, ret1
   113  }
   114  
   115  // BuildBlock indicates an expected call of BuildBlock.
   116  func (mr *MockChainVMMockRecorder) BuildBlock(arg0 any) *gomock.Call {
   117  	mr.mock.ctrl.T.Helper()
   118  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildBlock", reflect.TypeOf((*MockChainVM)(nil).BuildBlock), arg0)
   119  }
   120  
   121  // Connected mocks base method.
   122  func (m *MockChainVM) Connected(arg0 context.Context, arg1 ids.NodeID, arg2 *version.Application) error {
   123  	m.ctrl.T.Helper()
   124  	ret := m.ctrl.Call(m, "Connected", arg0, arg1, arg2)
   125  	ret0, _ := ret[0].(error)
   126  	return ret0
   127  }
   128  
   129  // Connected indicates an expected call of Connected.
   130  func (mr *MockChainVMMockRecorder) Connected(arg0, arg1, arg2 any) *gomock.Call {
   131  	mr.mock.ctrl.T.Helper()
   132  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connected", reflect.TypeOf((*MockChainVM)(nil).Connected), arg0, arg1, arg2)
   133  }
   134  
   135  // CreateHandlers mocks base method.
   136  func (m *MockChainVM) CreateHandlers(arg0 context.Context) (map[string]http.Handler, error) {
   137  	m.ctrl.T.Helper()
   138  	ret := m.ctrl.Call(m, "CreateHandlers", arg0)
   139  	ret0, _ := ret[0].(map[string]http.Handler)
   140  	ret1, _ := ret[1].(error)
   141  	return ret0, ret1
   142  }
   143  
   144  // CreateHandlers indicates an expected call of CreateHandlers.
   145  func (mr *MockChainVMMockRecorder) CreateHandlers(arg0 any) *gomock.Call {
   146  	mr.mock.ctrl.T.Helper()
   147  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHandlers", reflect.TypeOf((*MockChainVM)(nil).CreateHandlers), arg0)
   148  }
   149  
   150  // CrossChainAppRequest mocks base method.
   151  func (m *MockChainVM) CrossChainAppRequest(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 time.Time, arg4 []byte) error {
   152  	m.ctrl.T.Helper()
   153  	ret := m.ctrl.Call(m, "CrossChainAppRequest", arg0, arg1, arg2, arg3, arg4)
   154  	ret0, _ := ret[0].(error)
   155  	return ret0
   156  }
   157  
   158  // CrossChainAppRequest indicates an expected call of CrossChainAppRequest.
   159  func (mr *MockChainVMMockRecorder) CrossChainAppRequest(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call {
   160  	mr.mock.ctrl.T.Helper()
   161  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppRequest", reflect.TypeOf((*MockChainVM)(nil).CrossChainAppRequest), arg0, arg1, arg2, arg3, arg4)
   162  }
   163  
   164  // CrossChainAppRequestFailed mocks base method.
   165  func (m *MockChainVM) CrossChainAppRequestFailed(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 *common.AppError) error {
   166  	m.ctrl.T.Helper()
   167  	ret := m.ctrl.Call(m, "CrossChainAppRequestFailed", arg0, arg1, arg2, arg3)
   168  	ret0, _ := ret[0].(error)
   169  	return ret0
   170  }
   171  
   172  // CrossChainAppRequestFailed indicates an expected call of CrossChainAppRequestFailed.
   173  func (mr *MockChainVMMockRecorder) CrossChainAppRequestFailed(arg0, arg1, arg2, arg3 any) *gomock.Call {
   174  	mr.mock.ctrl.T.Helper()
   175  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppRequestFailed", reflect.TypeOf((*MockChainVM)(nil).CrossChainAppRequestFailed), arg0, arg1, arg2, arg3)
   176  }
   177  
   178  // CrossChainAppResponse mocks base method.
   179  func (m *MockChainVM) CrossChainAppResponse(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 []byte) error {
   180  	m.ctrl.T.Helper()
   181  	ret := m.ctrl.Call(m, "CrossChainAppResponse", arg0, arg1, arg2, arg3)
   182  	ret0, _ := ret[0].(error)
   183  	return ret0
   184  }
   185  
   186  // CrossChainAppResponse indicates an expected call of CrossChainAppResponse.
   187  func (mr *MockChainVMMockRecorder) CrossChainAppResponse(arg0, arg1, arg2, arg3 any) *gomock.Call {
   188  	mr.mock.ctrl.T.Helper()
   189  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppResponse", reflect.TypeOf((*MockChainVM)(nil).CrossChainAppResponse), arg0, arg1, arg2, arg3)
   190  }
   191  
   192  // Disconnected mocks base method.
   193  func (m *MockChainVM) Disconnected(arg0 context.Context, arg1 ids.NodeID) error {
   194  	m.ctrl.T.Helper()
   195  	ret := m.ctrl.Call(m, "Disconnected", arg0, arg1)
   196  	ret0, _ := ret[0].(error)
   197  	return ret0
   198  }
   199  
   200  // Disconnected indicates an expected call of Disconnected.
   201  func (mr *MockChainVMMockRecorder) Disconnected(arg0, arg1 any) *gomock.Call {
   202  	mr.mock.ctrl.T.Helper()
   203  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Disconnected", reflect.TypeOf((*MockChainVM)(nil).Disconnected), arg0, arg1)
   204  }
   205  
   206  // GetBlock mocks base method.
   207  func (m *MockChainVM) GetBlock(arg0 context.Context, arg1 ids.ID) (snowman.Block, error) {
   208  	m.ctrl.T.Helper()
   209  	ret := m.ctrl.Call(m, "GetBlock", arg0, arg1)
   210  	ret0, _ := ret[0].(snowman.Block)
   211  	ret1, _ := ret[1].(error)
   212  	return ret0, ret1
   213  }
   214  
   215  // GetBlock indicates an expected call of GetBlock.
   216  func (mr *MockChainVMMockRecorder) GetBlock(arg0, arg1 any) *gomock.Call {
   217  	mr.mock.ctrl.T.Helper()
   218  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockChainVM)(nil).GetBlock), arg0, arg1)
   219  }
   220  
   221  // GetBlockIDAtHeight mocks base method.
   222  func (m *MockChainVM) GetBlockIDAtHeight(arg0 context.Context, arg1 uint64) (ids.ID, error) {
   223  	m.ctrl.T.Helper()
   224  	ret := m.ctrl.Call(m, "GetBlockIDAtHeight", arg0, arg1)
   225  	ret0, _ := ret[0].(ids.ID)
   226  	ret1, _ := ret[1].(error)
   227  	return ret0, ret1
   228  }
   229  
   230  // GetBlockIDAtHeight indicates an expected call of GetBlockIDAtHeight.
   231  func (mr *MockChainVMMockRecorder) GetBlockIDAtHeight(arg0, arg1 any) *gomock.Call {
   232  	mr.mock.ctrl.T.Helper()
   233  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockIDAtHeight", reflect.TypeOf((*MockChainVM)(nil).GetBlockIDAtHeight), arg0, arg1)
   234  }
   235  
   236  // HealthCheck mocks base method.
   237  func (m *MockChainVM) HealthCheck(arg0 context.Context) (any, error) {
   238  	m.ctrl.T.Helper()
   239  	ret := m.ctrl.Call(m, "HealthCheck", arg0)
   240  	ret0, _ := ret[0].(any)
   241  	ret1, _ := ret[1].(error)
   242  	return ret0, ret1
   243  }
   244  
   245  // HealthCheck indicates an expected call of HealthCheck.
   246  func (mr *MockChainVMMockRecorder) HealthCheck(arg0 any) *gomock.Call {
   247  	mr.mock.ctrl.T.Helper()
   248  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HealthCheck", reflect.TypeOf((*MockChainVM)(nil).HealthCheck), arg0)
   249  }
   250  
   251  // Initialize mocks base method.
   252  func (m *MockChainVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.AppSender) error {
   253  	m.ctrl.T.Helper()
   254  	ret := m.ctrl.Call(m, "Initialize", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
   255  	ret0, _ := ret[0].(error)
   256  	return ret0
   257  }
   258  
   259  // Initialize indicates an expected call of Initialize.
   260  func (mr *MockChainVMMockRecorder) Initialize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 any) *gomock.Call {
   261  	mr.mock.ctrl.T.Helper()
   262  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Initialize", reflect.TypeOf((*MockChainVM)(nil).Initialize), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
   263  }
   264  
   265  // LastAccepted mocks base method.
   266  func (m *MockChainVM) LastAccepted(arg0 context.Context) (ids.ID, error) {
   267  	m.ctrl.T.Helper()
   268  	ret := m.ctrl.Call(m, "LastAccepted", arg0)
   269  	ret0, _ := ret[0].(ids.ID)
   270  	ret1, _ := ret[1].(error)
   271  	return ret0, ret1
   272  }
   273  
   274  // LastAccepted indicates an expected call of LastAccepted.
   275  func (mr *MockChainVMMockRecorder) LastAccepted(arg0 any) *gomock.Call {
   276  	mr.mock.ctrl.T.Helper()
   277  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LastAccepted", reflect.TypeOf((*MockChainVM)(nil).LastAccepted), arg0)
   278  }
   279  
   280  // ParseBlock mocks base method.
   281  func (m *MockChainVM) ParseBlock(arg0 context.Context, arg1 []byte) (snowman.Block, error) {
   282  	m.ctrl.T.Helper()
   283  	ret := m.ctrl.Call(m, "ParseBlock", arg0, arg1)
   284  	ret0, _ := ret[0].(snowman.Block)
   285  	ret1, _ := ret[1].(error)
   286  	return ret0, ret1
   287  }
   288  
   289  // ParseBlock indicates an expected call of ParseBlock.
   290  func (mr *MockChainVMMockRecorder) ParseBlock(arg0, arg1 any) *gomock.Call {
   291  	mr.mock.ctrl.T.Helper()
   292  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ParseBlock", reflect.TypeOf((*MockChainVM)(nil).ParseBlock), arg0, arg1)
   293  }
   294  
   295  // SetPreference mocks base method.
   296  func (m *MockChainVM) SetPreference(arg0 context.Context, arg1 ids.ID) error {
   297  	m.ctrl.T.Helper()
   298  	ret := m.ctrl.Call(m, "SetPreference", arg0, arg1)
   299  	ret0, _ := ret[0].(error)
   300  	return ret0
   301  }
   302  
   303  // SetPreference indicates an expected call of SetPreference.
   304  func (mr *MockChainVMMockRecorder) SetPreference(arg0, arg1 any) *gomock.Call {
   305  	mr.mock.ctrl.T.Helper()
   306  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetPreference", reflect.TypeOf((*MockChainVM)(nil).SetPreference), arg0, arg1)
   307  }
   308  
   309  // SetState mocks base method.
   310  func (m *MockChainVM) SetState(arg0 context.Context, arg1 snow.State) error {
   311  	m.ctrl.T.Helper()
   312  	ret := m.ctrl.Call(m, "SetState", arg0, arg1)
   313  	ret0, _ := ret[0].(error)
   314  	return ret0
   315  }
   316  
   317  // SetState indicates an expected call of SetState.
   318  func (mr *MockChainVMMockRecorder) SetState(arg0, arg1 any) *gomock.Call {
   319  	mr.mock.ctrl.T.Helper()
   320  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetState", reflect.TypeOf((*MockChainVM)(nil).SetState), arg0, arg1)
   321  }
   322  
   323  // Shutdown mocks base method.
   324  func (m *MockChainVM) Shutdown(arg0 context.Context) error {
   325  	m.ctrl.T.Helper()
   326  	ret := m.ctrl.Call(m, "Shutdown", arg0)
   327  	ret0, _ := ret[0].(error)
   328  	return ret0
   329  }
   330  
   331  // Shutdown indicates an expected call of Shutdown.
   332  func (mr *MockChainVMMockRecorder) Shutdown(arg0 any) *gomock.Call {
   333  	mr.mock.ctrl.T.Helper()
   334  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockChainVM)(nil).Shutdown), arg0)
   335  }
   336  
   337  // Version mocks base method.
   338  func (m *MockChainVM) Version(arg0 context.Context) (string, error) {
   339  	m.ctrl.T.Helper()
   340  	ret := m.ctrl.Call(m, "Version", arg0)
   341  	ret0, _ := ret[0].(string)
   342  	ret1, _ := ret[1].(error)
   343  	return ret0, ret1
   344  }
   345  
   346  // Version indicates an expected call of Version.
   347  func (mr *MockChainVMMockRecorder) Version(arg0 any) *gomock.Call {
   348  	mr.mock.ctrl.T.Helper()
   349  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Version", reflect.TypeOf((*MockChainVM)(nil).Version), arg0)
   350  }