public async Task ExecuteBlocks_Success() { var chain = await _smartContractExecutionHelper.CreateChainAsync(); var block = _kernelTestHelper.GenerateBlock(chain.BestChainHeight, chain.BestChainHash); var transactions = new List <Transaction> { new Transaction { From = SampleAddress.AddressList[0], To = _smartContractAddressService.GetZeroSmartContractAddress(), MethodName = nameof(ACS0Container.ACS0Stub.GetContractInfo), Params = _smartContractAddressService.GetZeroSmartContractAddress().ToByteString() } }; var blockExecutedSet = await _blockExecutingService.ExecuteBlockAsync(block.Header, transactions); await _blockStateSetManger.RemoveBlockStateSetsAsync(new List <Hash> { blockExecutedSet.GetHash() }); await _blockchainService.AddTransactionsAsync(transactions); await ExecuteBlocksAsync(new List <Block> { blockExecutedSet.Block }); }
public async Task RemoveBlockStateSetsAsync(IList <Hash> blockStateHashes) { await _blockStateSetManger.RemoveBlockStateSetsAsync(blockStateHashes); }