github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mempool/mock/execution_tree.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mempool
     4  
     5  import (
     6  	flow "github.com/onflow/flow-go/model/flow"
     7  	mempool "github.com/onflow/flow-go/module/mempool"
     8  
     9  	mock "github.com/stretchr/testify/mock"
    10  )
    11  
    12  // ExecutionTree is an autogenerated mock type for the ExecutionTree type
    13  type ExecutionTree struct {
    14  	mock.Mock
    15  }
    16  
    17  // AddReceipt provides a mock function with given fields: receipt, block
    18  func (_m *ExecutionTree) AddReceipt(receipt *flow.ExecutionReceipt, block *flow.Header) (bool, error) {
    19  	ret := _m.Called(receipt, block)
    20  
    21  	var r0 bool
    22  	var r1 error
    23  	if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt, *flow.Header) (bool, error)); ok {
    24  		return rf(receipt, block)
    25  	}
    26  	if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt, *flow.Header) bool); ok {
    27  		r0 = rf(receipt, block)
    28  	} else {
    29  		r0 = ret.Get(0).(bool)
    30  	}
    31  
    32  	if rf, ok := ret.Get(1).(func(*flow.ExecutionReceipt, *flow.Header) error); ok {
    33  		r1 = rf(receipt, block)
    34  	} else {
    35  		r1 = ret.Error(1)
    36  	}
    37  
    38  	return r0, r1
    39  }
    40  
    41  // AddResult provides a mock function with given fields: result, block
    42  func (_m *ExecutionTree) AddResult(result *flow.ExecutionResult, block *flow.Header) error {
    43  	ret := _m.Called(result, block)
    44  
    45  	var r0 error
    46  	if rf, ok := ret.Get(0).(func(*flow.ExecutionResult, *flow.Header) error); ok {
    47  		r0 = rf(result, block)
    48  	} else {
    49  		r0 = ret.Error(0)
    50  	}
    51  
    52  	return r0
    53  }
    54  
    55  // HasReceipt provides a mock function with given fields: receipt
    56  func (_m *ExecutionTree) HasReceipt(receipt *flow.ExecutionReceipt) bool {
    57  	ret := _m.Called(receipt)
    58  
    59  	var r0 bool
    60  	if rf, ok := ret.Get(0).(func(*flow.ExecutionReceipt) bool); ok {
    61  		r0 = rf(receipt)
    62  	} else {
    63  		r0 = ret.Get(0).(bool)
    64  	}
    65  
    66  	return r0
    67  }
    68  
    69  // LowestHeight provides a mock function with given fields:
    70  func (_m *ExecutionTree) LowestHeight() uint64 {
    71  	ret := _m.Called()
    72  
    73  	var r0 uint64
    74  	if rf, ok := ret.Get(0).(func() uint64); ok {
    75  		r0 = rf()
    76  	} else {
    77  		r0 = ret.Get(0).(uint64)
    78  	}
    79  
    80  	return r0
    81  }
    82  
    83  // PruneUpToHeight provides a mock function with given fields: newLowestHeight
    84  func (_m *ExecutionTree) PruneUpToHeight(newLowestHeight uint64) error {
    85  	ret := _m.Called(newLowestHeight)
    86  
    87  	var r0 error
    88  	if rf, ok := ret.Get(0).(func(uint64) error); ok {
    89  		r0 = rf(newLowestHeight)
    90  	} else {
    91  		r0 = ret.Error(0)
    92  	}
    93  
    94  	return r0
    95  }
    96  
    97  // ReachableReceipts provides a mock function with given fields: resultID, blockFilter, receiptFilter
    98  func (_m *ExecutionTree) ReachableReceipts(resultID flow.Identifier, blockFilter mempool.BlockFilter, receiptFilter mempool.ReceiptFilter) ([]*flow.ExecutionReceipt, error) {
    99  	ret := _m.Called(resultID, blockFilter, receiptFilter)
   100  
   101  	var r0 []*flow.ExecutionReceipt
   102  	var r1 error
   103  	if rf, ok := ret.Get(0).(func(flow.Identifier, mempool.BlockFilter, mempool.ReceiptFilter) ([]*flow.ExecutionReceipt, error)); ok {
   104  		return rf(resultID, blockFilter, receiptFilter)
   105  	}
   106  	if rf, ok := ret.Get(0).(func(flow.Identifier, mempool.BlockFilter, mempool.ReceiptFilter) []*flow.ExecutionReceipt); ok {
   107  		r0 = rf(resultID, blockFilter, receiptFilter)
   108  	} else {
   109  		if ret.Get(0) != nil {
   110  			r0 = ret.Get(0).([]*flow.ExecutionReceipt)
   111  		}
   112  	}
   113  
   114  	if rf, ok := ret.Get(1).(func(flow.Identifier, mempool.BlockFilter, mempool.ReceiptFilter) error); ok {
   115  		r1 = rf(resultID, blockFilter, receiptFilter)
   116  	} else {
   117  		r1 = ret.Error(1)
   118  	}
   119  
   120  	return r0, r1
   121  }
   122  
   123  // Size provides a mock function with given fields:
   124  func (_m *ExecutionTree) Size() uint {
   125  	ret := _m.Called()
   126  
   127  	var r0 uint
   128  	if rf, ok := ret.Get(0).(func() uint); ok {
   129  		r0 = rf()
   130  	} else {
   131  		r0 = ret.Get(0).(uint)
   132  	}
   133  
   134  	return r0
   135  }
   136  
   137  type mockConstructorTestingTNewExecutionTree interface {
   138  	mock.TestingT
   139  	Cleanup(func())
   140  }
   141  
   142  // NewExecutionTree creates a new instance of ExecutionTree. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   143  func NewExecutionTree(t mockConstructorTestingTNewExecutionTree) *ExecutionTree {
   144  	mock := &ExecutionTree{}
   145  	mock.Mock.Test(t)
   146  
   147  	t.Cleanup(func() { mock.AssertExpectations(t) })
   148  
   149  	return mock
   150  }