public void Start_BlockOnChain_DoesNotReorgWalletManager() { this.storeSettings.AmountOfBlocksToKeep = 0; this.chainIndexer = WalletTestsHelpers.PrepareChainWithBlock(); this.walletManager.Setup(w => w.WalletTipHash) .Returns(this.chainIndexer.Tip.Header.GetHash()); var walletSyncManager = new WalletSyncManager(this.LoggerFactory.Object, this.walletManager.Object, this.chainIndexer, KnownNetworks.StratisMain, this.blockStore.Object, this.storeSettings, this.signals, this.asyncProvider); walletSyncManager.Start(); this.walletManager.Verify(w => w.GetFirstWalletBlockLocator(), Times.Exactly(0)); this.walletManager.Verify(w => w.RemoveBlocks(It.IsAny <ChainedHeader>()), Times.Exactly(0)); }
public void Start_BlockOnChain_DoesNotReorgWalletManager() { this.storeSettings.Prune = false; this.chain = WalletTestsHelpers.PrepareChainWithBlock(); this.walletManager.Setup(w => w.WalletTipHash) .Returns(this.chain.Tip.Header.GetHash()); var walletSyncManager = new WalletSyncManager(this.LoggerFactory.Object, this.walletManager.Object, this.chain, Network.StratisMain, this.blockStoreCache.Object, this.storeSettings, this.nodeLifetime.Object); walletSyncManager.Start(); this.walletManager.Verify(w => w.GetFirstWalletBlockLocator(), Times.Exactly(0)); this.walletManager.Verify(w => w.RemoveBlocks(It.IsAny <ChainedHeader>()), Times.Exactly(0)); }