Update tests for error propagation
This commit is contained in:
@@ -85,9 +85,10 @@ func (repository *MockBlockRepository) MissingBlockNumbers(startingBlockNumber i
|
||||
return repository.missingBlockNumbersReturnArray
|
||||
}
|
||||
|
||||
func (repository *MockBlockRepository) SetBlocksStatus(chainHead int64) {
|
||||
func (repository *MockBlockRepository) SetBlocksStatus(chainHead int64) error {
|
||||
repository.setBlockStatusCalled = true
|
||||
repository.setBlockStatusPassedChainHead = chainHead
|
||||
return nil
|
||||
}
|
||||
|
||||
func (repository *MockBlockRepository) AssertCreateOrUpdateBlockCallCountEquals(times int) {
|
||||
|
||||
@@ -108,8 +108,8 @@ func (chain *MockBlockChain) CallContract(contractHash string, input []byte, blo
|
||||
return []byte{}, nil
|
||||
}
|
||||
|
||||
func (chain *MockBlockChain) LastBlock() *big.Int {
|
||||
return chain.lastBlock
|
||||
func (chain *MockBlockChain) LastBlock() (*big.Int, error) {
|
||||
return chain.lastBlock, nil
|
||||
}
|
||||
|
||||
func (chain *MockBlockChain) Node() core.Node {
|
||||
|
||||
@@ -65,14 +65,6 @@ func (repository *MockHeaderRepository) MissingBlockNumbers(startingBlockNumber,
|
||||
return repository.missingBlockNumbers, nil
|
||||
}
|
||||
|
||||
func (repository *MockHeaderRepository) HeaderExists(blockNumber int64) (bool, error) {
|
||||
return repository.headerExists, nil
|
||||
}
|
||||
|
||||
func (repository *MockHeaderRepository) SetHeaderExists(headerExists bool) {
|
||||
repository.headerExists = headerExists
|
||||
}
|
||||
|
||||
func (repository *MockHeaderRepository) SetGetHeaderError(err error) {
|
||||
repository.getHeaderError = err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user