public GetTransactions ( global request, Metadata headers = null, DateTime deadline = null, CancellationToken cancellationToken = default(CancellationToken) ) : global::Walletrpc.GetTransactionsResponse | ||
request | global | |
headers | Metadata | |
deadline | DateTime | |
cancellationToken | CancellationToken | |
return | global::Walletrpc.GetTransactionsResponse |
public global::Walletrpc.GetTransactionsResponse GetTransactions(global::Walletrpc.GetTransactionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
{
var call = CreateCall(__Method_GetTransactions, new CallOptions(headers, deadline, cancellationToken));
return Calls.BlockingUnaryCall(call, request);
}
public global::Walletrpc.GetTransactionsResponse GetTransactions(global::Walletrpc.GetTransactionsRequest request, CallOptions options)
WalletService.WalletServiceClient::GetTransactions ( global request, CallOptions options ) : global::Walletrpc.GetTransactionsResponse |
public async Task<TransactionSet> GetTransactionsAsync(int minRecentTransactions, int minRecentBlocks) { var client = new WalletService.WalletServiceClient(_channel); var request = new GetTransactionsRequest { // TODO: include these. With these uncommented, all transactions are loaded. //StartingBlockHeight = -minRecentBlocks, //MinimumRecentTransactions = minRecentTransactions }; var responseStream = client.GetTransactions(request, cancellationToken: _tokenSource.Token).ResponseStream; var minedTransactions = new List<Block>(); Dictionary<Blake256Hash, WalletTransaction> unminedTransactions = null; while (await responseStream.MoveNext()) { var msg = responseStream.Current; if (msg.MinedTransactions != null) minedTransactions.Add(MarshalBlock(msg.MinedTransactions)); else unminedTransactions = msg.UnminedTransactions.Select(MarshalWalletTransaction).ToDictionary(tx => tx.Hash); } return new TransactionSet(minedTransactions, unminedTransactions ?? new Dictionary<Blake256Hash, WalletTransaction>()); }