github.com/iotexproject/iotex-core@v1.14.1-rc1/test/mock/mock_blockchain/mock_blockchain.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: ./blockchain/blockchain.go
     3  
     4  // Package mock_blockchain is a generated GoMock package.
     5  package mock_blockchain
     6  
     7  import (
     8  	context "context"
     9  	reflect "reflect"
    10  	time "time"
    11  
    12  	gomock "github.com/golang/mock/gomock"
    13  	hash "github.com/iotexproject/go-pkgs/hash"
    14  	action "github.com/iotexproject/iotex-core/action"
    15  	blockchain "github.com/iotexproject/iotex-core/blockchain"
    16  	block "github.com/iotexproject/iotex-core/blockchain/block"
    17  	genesis "github.com/iotexproject/iotex-core/blockchain/genesis"
    18  )
    19  
    20  // MockBlockchain is a mock of Blockchain interface.
    21  type MockBlockchain struct {
    22  	ctrl     *gomock.Controller
    23  	recorder *MockBlockchainMockRecorder
    24  }
    25  
    26  // MockBlockchainMockRecorder is the mock recorder for MockBlockchain.
    27  type MockBlockchainMockRecorder struct {
    28  	mock *MockBlockchain
    29  }
    30  
    31  // NewMockBlockchain creates a new mock instance.
    32  func NewMockBlockchain(ctrl *gomock.Controller) *MockBlockchain {
    33  	mock := &MockBlockchain{ctrl: ctrl}
    34  	mock.recorder = &MockBlockchainMockRecorder{mock}
    35  	return mock
    36  }
    37  
    38  // EXPECT returns an object that allows the caller to indicate expected use.
    39  func (m *MockBlockchain) EXPECT() *MockBlockchainMockRecorder {
    40  	return m.recorder
    41  }
    42  
    43  // AddSubscriber mocks base method.
    44  func (m *MockBlockchain) AddSubscriber(arg0 blockchain.BlockCreationSubscriber) error {
    45  	m.ctrl.T.Helper()
    46  	ret := m.ctrl.Call(m, "AddSubscriber", arg0)
    47  	ret0, _ := ret[0].(error)
    48  	return ret0
    49  }
    50  
    51  // AddSubscriber indicates an expected call of AddSubscriber.
    52  func (mr *MockBlockchainMockRecorder) AddSubscriber(arg0 interface{}) *gomock.Call {
    53  	mr.mock.ctrl.T.Helper()
    54  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubscriber", reflect.TypeOf((*MockBlockchain)(nil).AddSubscriber), arg0)
    55  }
    56  
    57  // BlockFooterByHeight mocks base method.
    58  func (m *MockBlockchain) BlockFooterByHeight(height uint64) (*block.Footer, error) {
    59  	m.ctrl.T.Helper()
    60  	ret := m.ctrl.Call(m, "BlockFooterByHeight", height)
    61  	ret0, _ := ret[0].(*block.Footer)
    62  	ret1, _ := ret[1].(error)
    63  	return ret0, ret1
    64  }
    65  
    66  // BlockFooterByHeight indicates an expected call of BlockFooterByHeight.
    67  func (mr *MockBlockchainMockRecorder) BlockFooterByHeight(height interface{}) *gomock.Call {
    68  	mr.mock.ctrl.T.Helper()
    69  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockFooterByHeight", reflect.TypeOf((*MockBlockchain)(nil).BlockFooterByHeight), height)
    70  }
    71  
    72  // BlockHeaderByHeight mocks base method.
    73  func (m *MockBlockchain) BlockHeaderByHeight(height uint64) (*block.Header, error) {
    74  	m.ctrl.T.Helper()
    75  	ret := m.ctrl.Call(m, "BlockHeaderByHeight", height)
    76  	ret0, _ := ret[0].(*block.Header)
    77  	ret1, _ := ret[1].(error)
    78  	return ret0, ret1
    79  }
    80  
    81  // BlockHeaderByHeight indicates an expected call of BlockHeaderByHeight.
    82  func (mr *MockBlockchainMockRecorder) BlockHeaderByHeight(height interface{}) *gomock.Call {
    83  	mr.mock.ctrl.T.Helper()
    84  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BlockHeaderByHeight", reflect.TypeOf((*MockBlockchain)(nil).BlockHeaderByHeight), height)
    85  }
    86  
    87  // ChainAddress mocks base method.
    88  func (m *MockBlockchain) ChainAddress() string {
    89  	m.ctrl.T.Helper()
    90  	ret := m.ctrl.Call(m, "ChainAddress")
    91  	ret0, _ := ret[0].(string)
    92  	return ret0
    93  }
    94  
    95  // ChainAddress indicates an expected call of ChainAddress.
    96  func (mr *MockBlockchainMockRecorder) ChainAddress() *gomock.Call {
    97  	mr.mock.ctrl.T.Helper()
    98  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainAddress", reflect.TypeOf((*MockBlockchain)(nil).ChainAddress))
    99  }
   100  
   101  // ChainID mocks base method.
   102  func (m *MockBlockchain) ChainID() uint32 {
   103  	m.ctrl.T.Helper()
   104  	ret := m.ctrl.Call(m, "ChainID")
   105  	ret0, _ := ret[0].(uint32)
   106  	return ret0
   107  }
   108  
   109  // ChainID indicates an expected call of ChainID.
   110  func (mr *MockBlockchainMockRecorder) ChainID() *gomock.Call {
   111  	mr.mock.ctrl.T.Helper()
   112  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainID", reflect.TypeOf((*MockBlockchain)(nil).ChainID))
   113  }
   114  
   115  // CommitBlock mocks base method.
   116  func (m *MockBlockchain) CommitBlock(blk *block.Block) error {
   117  	m.ctrl.T.Helper()
   118  	ret := m.ctrl.Call(m, "CommitBlock", blk)
   119  	ret0, _ := ret[0].(error)
   120  	return ret0
   121  }
   122  
   123  // CommitBlock indicates an expected call of CommitBlock.
   124  func (mr *MockBlockchainMockRecorder) CommitBlock(blk interface{}) *gomock.Call {
   125  	mr.mock.ctrl.T.Helper()
   126  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitBlock", reflect.TypeOf((*MockBlockchain)(nil).CommitBlock), blk)
   127  }
   128  
   129  // Context mocks base method.
   130  func (m *MockBlockchain) Context(arg0 context.Context) (context.Context, error) {
   131  	m.ctrl.T.Helper()
   132  	ret := m.ctrl.Call(m, "Context", arg0)
   133  	ret0, _ := ret[0].(context.Context)
   134  	ret1, _ := ret[1].(error)
   135  	return ret0, ret1
   136  }
   137  
   138  // Context indicates an expected call of Context.
   139  func (mr *MockBlockchainMockRecorder) Context(arg0 interface{}) *gomock.Call {
   140  	mr.mock.ctrl.T.Helper()
   141  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockBlockchain)(nil).Context), arg0)
   142  }
   143  
   144  // EvmNetworkID mocks base method.
   145  func (m *MockBlockchain) EvmNetworkID() uint32 {
   146  	m.ctrl.T.Helper()
   147  	ret := m.ctrl.Call(m, "EvmNetworkID")
   148  	ret0, _ := ret[0].(uint32)
   149  	return ret0
   150  }
   151  
   152  // EvmNetworkID indicates an expected call of EvmNetworkID.
   153  func (mr *MockBlockchainMockRecorder) EvmNetworkID() *gomock.Call {
   154  	mr.mock.ctrl.T.Helper()
   155  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EvmNetworkID", reflect.TypeOf((*MockBlockchain)(nil).EvmNetworkID))
   156  }
   157  
   158  // Genesis mocks base method.
   159  func (m *MockBlockchain) Genesis() genesis.Genesis {
   160  	m.ctrl.T.Helper()
   161  	ret := m.ctrl.Call(m, "Genesis")
   162  	ret0, _ := ret[0].(genesis.Genesis)
   163  	return ret0
   164  }
   165  
   166  // Genesis indicates an expected call of Genesis.
   167  func (mr *MockBlockchainMockRecorder) Genesis() *gomock.Call {
   168  	mr.mock.ctrl.T.Helper()
   169  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Genesis", reflect.TypeOf((*MockBlockchain)(nil).Genesis))
   170  }
   171  
   172  // MintNewBlock mocks base method.
   173  func (m *MockBlockchain) MintNewBlock(timestamp time.Time) (*block.Block, error) {
   174  	m.ctrl.T.Helper()
   175  	ret := m.ctrl.Call(m, "MintNewBlock", timestamp)
   176  	ret0, _ := ret[0].(*block.Block)
   177  	ret1, _ := ret[1].(error)
   178  	return ret0, ret1
   179  }
   180  
   181  // MintNewBlock indicates an expected call of MintNewBlock.
   182  func (mr *MockBlockchainMockRecorder) MintNewBlock(timestamp interface{}) *gomock.Call {
   183  	mr.mock.ctrl.T.Helper()
   184  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MintNewBlock", reflect.TypeOf((*MockBlockchain)(nil).MintNewBlock), timestamp)
   185  }
   186  
   187  // RemoveSubscriber mocks base method.
   188  func (m *MockBlockchain) RemoveSubscriber(arg0 blockchain.BlockCreationSubscriber) error {
   189  	m.ctrl.T.Helper()
   190  	ret := m.ctrl.Call(m, "RemoveSubscriber", arg0)
   191  	ret0, _ := ret[0].(error)
   192  	return ret0
   193  }
   194  
   195  // RemoveSubscriber indicates an expected call of RemoveSubscriber.
   196  func (mr *MockBlockchainMockRecorder) RemoveSubscriber(arg0 interface{}) *gomock.Call {
   197  	mr.mock.ctrl.T.Helper()
   198  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveSubscriber", reflect.TypeOf((*MockBlockchain)(nil).RemoveSubscriber), arg0)
   199  }
   200  
   201  // Start mocks base method.
   202  func (m *MockBlockchain) Start(arg0 context.Context) error {
   203  	m.ctrl.T.Helper()
   204  	ret := m.ctrl.Call(m, "Start", arg0)
   205  	ret0, _ := ret[0].(error)
   206  	return ret0
   207  }
   208  
   209  // Start indicates an expected call of Start.
   210  func (mr *MockBlockchainMockRecorder) Start(arg0 interface{}) *gomock.Call {
   211  	mr.mock.ctrl.T.Helper()
   212  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockBlockchain)(nil).Start), arg0)
   213  }
   214  
   215  // Stop mocks base method.
   216  func (m *MockBlockchain) Stop(arg0 context.Context) error {
   217  	m.ctrl.T.Helper()
   218  	ret := m.ctrl.Call(m, "Stop", arg0)
   219  	ret0, _ := ret[0].(error)
   220  	return ret0
   221  }
   222  
   223  // Stop indicates an expected call of Stop.
   224  func (mr *MockBlockchainMockRecorder) Stop(arg0 interface{}) *gomock.Call {
   225  	mr.mock.ctrl.T.Helper()
   226  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockBlockchain)(nil).Stop), arg0)
   227  }
   228  
   229  // TipHash mocks base method.
   230  func (m *MockBlockchain) TipHash() hash.Hash256 {
   231  	m.ctrl.T.Helper()
   232  	ret := m.ctrl.Call(m, "TipHash")
   233  	ret0, _ := ret[0].(hash.Hash256)
   234  	return ret0
   235  }
   236  
   237  // TipHash indicates an expected call of TipHash.
   238  func (mr *MockBlockchainMockRecorder) TipHash() *gomock.Call {
   239  	mr.mock.ctrl.T.Helper()
   240  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TipHash", reflect.TypeOf((*MockBlockchain)(nil).TipHash))
   241  }
   242  
   243  // TipHeight mocks base method.
   244  func (m *MockBlockchain) TipHeight() uint64 {
   245  	m.ctrl.T.Helper()
   246  	ret := m.ctrl.Call(m, "TipHeight")
   247  	ret0, _ := ret[0].(uint64)
   248  	return ret0
   249  }
   250  
   251  // TipHeight indicates an expected call of TipHeight.
   252  func (mr *MockBlockchainMockRecorder) TipHeight() *gomock.Call {
   253  	mr.mock.ctrl.T.Helper()
   254  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TipHeight", reflect.TypeOf((*MockBlockchain)(nil).TipHeight))
   255  }
   256  
   257  // ValidateBlock mocks base method.
   258  func (m *MockBlockchain) ValidateBlock(blk *block.Block) error {
   259  	m.ctrl.T.Helper()
   260  	ret := m.ctrl.Call(m, "ValidateBlock", blk)
   261  	ret0, _ := ret[0].(error)
   262  	return ret0
   263  }
   264  
   265  // ValidateBlock indicates an expected call of ValidateBlock.
   266  func (mr *MockBlockchainMockRecorder) ValidateBlock(blk interface{}) *gomock.Call {
   267  	mr.mock.ctrl.T.Helper()
   268  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateBlock", reflect.TypeOf((*MockBlockchain)(nil).ValidateBlock), blk)
   269  }
   270  
   271  // MockBlockBuilderFactory is a mock of BlockBuilderFactory interface.
   272  type MockBlockBuilderFactory struct {
   273  	ctrl     *gomock.Controller
   274  	recorder *MockBlockBuilderFactoryMockRecorder
   275  }
   276  
   277  // MockBlockBuilderFactoryMockRecorder is the mock recorder for MockBlockBuilderFactory.
   278  type MockBlockBuilderFactoryMockRecorder struct {
   279  	mock *MockBlockBuilderFactory
   280  }
   281  
   282  // NewMockBlockBuilderFactory creates a new mock instance.
   283  func NewMockBlockBuilderFactory(ctrl *gomock.Controller) *MockBlockBuilderFactory {
   284  	mock := &MockBlockBuilderFactory{ctrl: ctrl}
   285  	mock.recorder = &MockBlockBuilderFactoryMockRecorder{mock}
   286  	return mock
   287  }
   288  
   289  // EXPECT returns an object that allows the caller to indicate expected use.
   290  func (m *MockBlockBuilderFactory) EXPECT() *MockBlockBuilderFactoryMockRecorder {
   291  	return m.recorder
   292  }
   293  
   294  // NewBlockBuilder mocks base method.
   295  func (m *MockBlockBuilderFactory) NewBlockBuilder(arg0 context.Context, arg1 func(action.Envelope) (*action.SealedEnvelope, error)) (*block.Builder, error) {
   296  	m.ctrl.T.Helper()
   297  	ret := m.ctrl.Call(m, "NewBlockBuilder", arg0, arg1)
   298  	ret0, _ := ret[0].(*block.Builder)
   299  	ret1, _ := ret[1].(error)
   300  	return ret0, ret1
   301  }
   302  
   303  // NewBlockBuilder indicates an expected call of NewBlockBuilder.
   304  func (mr *MockBlockBuilderFactoryMockRecorder) NewBlockBuilder(arg0, arg1 interface{}) *gomock.Call {
   305  	mr.mock.ctrl.T.Helper()
   306  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewBlockBuilder", reflect.TypeOf((*MockBlockBuilderFactory)(nil).NewBlockBuilder), arg0, arg1)
   307  }