forked from cerc-io/ipld-eth-server
Consolidate test doubles
- Migrate various mocks of core namespaces to shared version in `fakes` pkg - Err on the side of making test doubles less sophisticated - Don't pull over mocks of namespaces that are only used in example code
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"log"
|
||||
)
|
||||
|
||||
func PopulateMissingHeaders(blockchain core.Blockchain, headerRepository datastore.HeaderRepository, startingBlockNumber int64) int {
|
||||
func PopulateMissingHeaders(blockchain core.BlockChain, headerRepository datastore.HeaderRepository, startingBlockNumber int64) int {
|
||||
lastBlock := blockchain.LastBlock().Int64()
|
||||
blockRange := headerRepository.MissingBlockNumbers(startingBlockNumber, lastBlock, blockchain.Node().ID)
|
||||
log.SetPrefix("")
|
||||
@@ -15,7 +15,7 @@ func PopulateMissingHeaders(blockchain core.Blockchain, headerRepository datasto
|
||||
return len(blockRange)
|
||||
}
|
||||
|
||||
func RetrieveAndUpdateHeaders(blockchain core.Blockchain, headerRepository datastore.HeaderRepository, blockNumbers []int64) int {
|
||||
func RetrieveAndUpdateHeaders(blockchain core.BlockChain, headerRepository datastore.HeaderRepository, blockNumbers []int64) int {
|
||||
for _, blockNumber := range blockNumbers {
|
||||
header, err := blockchain.GetHeaderByNumber(blockNumber)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user