private void SetDefaults()
                {
                    SyncPeerPool = Substitute.For <ISyncPeerPool>();
                    var peerInfos = _peers.Select(p => new PeerInfo(p));

                    SyncPeerPool.InitializedPeers.Returns(peerInfos);
                    SyncPeerPool.AllPeers.Returns(peerInfos);

                    SyncProgressResolver = Substitute.For <ISyncProgressResolver>();
                    SyncProgressResolver.ChainDifficulty.Returns(ValidGenesis.TotalDifficulty ?? 0);
                    SyncProgressResolver.FindBestHeader().Returns(0);
                    SyncProgressResolver.FindBestFullBlock().Returns(0);
                    SyncProgressResolver.FindBestFullState().Returns(0);
                    SyncProgressResolver.IsLoadingBlocksFromDb().Returns(false);
                    SyncProgressResolver.IsFastBlocksFinished().Returns(false);

                    SyncConfig.FastSync                   = false;
                    SyncConfig.FastBlocks                 = false;
                    SyncConfig.BeamSync                   = false;
                    SyncConfig.PivotNumber                = Pivot.Number.ToString();
                    SyncConfig.PivotHash                  = Keccak.Zero.ToString();
                    SyncConfig.SynchronizationEnabled     = true;
                    SyncConfig.DownloadBodiesInFastSync   = true;
                    SyncConfig.DownloadReceiptsInFastSync = true;
                    SyncConfig.FastSyncCatchUpHeightDelta = FastSyncCatchUpHeightDelta;
                }
 public ScenarioBuilder WhenThisNodeIsLoadingBlocksFromDb()
 {
     _overwrites.Add(() => SyncProgressResolver.IsLoadingBlocksFromDb().Returns(true));
     return(this);
 }