/// <summary> /// This method returns serialization input for cross chain proposing method. /// </summary> /// <param name="blockHash"></param> /// <param name="blockHeight"></param> /// <returns></returns> public Task <CrossChainTransactionInput> GetCrossChainTransactionInputForNextMiningAsync(Hash blockHash, long blockHeight) { var inputForNextMining = _transactionInputForBlockMiningDataProvider.GetTransactionInputForBlockMining(blockHash); return(Task.FromResult(inputForNextMining)); }
public void TransactionInputForBlockMiningDataProvider_AddAndGet_Tests() { var blockHash = HashHelper.ComputeFrom("Random"); var crossChainTransactionInput = new CrossChainTransactionInput { PreviousBlockHeight = 10 }; _transactionInputForBlockMiningDataProvider.AddTransactionInputForBlockMining(blockHash, crossChainTransactionInput); { var actual = _transactionInputForBlockMiningDataProvider.GetTransactionInputForBlockMining(blockHash); actual.ShouldBe(crossChainTransactionInput); } { _transactionInputForBlockMiningDataProvider.ClearExpiredTransactionInput(11); var actual = _transactionInputForBlockMiningDataProvider.GetTransactionInputForBlockMining(blockHash); actual.ShouldBeNull(); } }