github.com/grupokindynos/coins-explorer@v0.0.0-20210507172551-fa8983d19250/db/test_helper.go (about) 1 // +build integration 2 3 package db 4 5 import ( 6 "github.com/grupokindynos/coins-explorer/bchain" 7 ) 8 9 func SetBlockChain(w *SyncWorker, chain bchain.BlockChain) { 10 w.chain = chain 11 } 12 13 func ConnectBlocks(w *SyncWorker, onNewBlock bchain.OnNewBlockFunc, initialSync bool) error { 14 return w.connectBlocks(onNewBlock, initialSync) 15 } 16 17 func HandleFork(w *SyncWorker, localBestHeight uint32, localBestHash string, onNewBlock bchain.OnNewBlockFunc, initialSync bool) error { 18 return w.handleFork(localBestHeight, localBestHash, onNewBlock, initialSync) 19 }