always create downloader

This commit is contained in:
jagdeep sidhu 2024-10-07 20:44:11 -07:00
parent 8b8b66352a
commit dceecbd541

View file

@ -181,8 +181,9 @@ func newHandler(config *handlerConfig) (*handler, error) {
return nil, errors.New("snap sync not supported with snapshots disabled") return nil, errors.New("snap sync not supported with snapshots disabled")
} }
// SYSCOIN Construct the downloader (long sync) // SYSCOIN Construct the downloader (long sync)
if h.chain.GetChainConfig().SyscoinBlock == nil { h.downloader = downloader.New(config.Database, h.eventMux, h.chain, h.removePeer, h.enableSyncedFeatures)
h.downloader = downloader.New(config.Database, h.eventMux, h.chain, h.removePeer, h.enableSyncedFeatures) if h.chain.GetChainConfig().SyscoinBlock != nil {
h.downloader.Terminate()
} }
fetchTx := func(peer string, hashes []common.Hash) error { fetchTx := func(peer string, hashes []common.Hash) error {