public async Task FinishInitialSync_Test() { int chainId = ChainHelper.ConvertBase58ToChainId("AELF"); long libHeight = 10; _crossChainTestHelper.AddFakeChainIdHeight(chainId, libHeight); _crossChainConfigOptions.CrossChainDataValidationIgnored.ShouldBeTrue(); await _crossChainService.FinishInitialSyncAsync(); _crossChainConfigOptions.CrossChainDataValidationIgnored.ShouldBeFalse(); var height = _crossChainCacheEntityService.GetTargetHeightForChainCacheEntity(chainId); { Should.Throw <InvalidOperationException>(() => _crossChainCacheEntityService.GetTargetHeightForChainCacheEntity(chainId - 1)); } Assert.Equal(libHeight + 1, height); }