private void Handle(GetReceiptsMessage msg) { TransactionReceipt[][] transactionReceipts = SyncServer.GetReceipts(msg.BlockHashes); Interlocked.Increment(ref _counter); if (Logger.IsTrace) { Logger.Trace($"OUT {_counter:D5} Receipts to {Node:s}"); } Send(new ReceiptsMessage(transactionReceipts)); }
private void Handle(GetReceiptsMessage msg) { Stopwatch stopwatch = Stopwatch.StartNew(); TxReceipt[][] txReceipts = SyncServer.GetReceipts(msg.BlockHashes); Interlocked.Increment(ref Counter); Send(new ReceiptsMessage(txReceipts)); stopwatch.Stop(); if (Logger.IsTrace) { Logger.Trace($"OUT {Counter:D5} Receipts to {Node:c} in {stopwatch.Elapsed.TotalMilliseconds}ms"); } }
private void Handle(GetReceiptsMessage msg) { Metrics.Eth63GetReceiptsReceived++; if (msg.Hashes.Count > 512) { throw new EthSyncException("Incoming receipts request for more than 512 blocks"); } Stopwatch stopwatch = Stopwatch.StartNew(); TxReceipt[][] txReceipts = SyncServer.GetReceipts(msg.Hashes); Send(new ReceiptsMessage(txReceipts)); stopwatch.Stop(); if (Logger.IsTrace) { Logger.Trace($"OUT {Counter:D5} Receipts to {Node:c} in {stopwatch.Elapsed.TotalMilliseconds}ms"); } }
protected ReceiptsMessage FulfillReceiptsRequest(GetReceiptsMessage getReceiptsMessage) { TxReceipt[][] txReceipts = new TxReceipt[getReceiptsMessage.Hashes.Count][]; ulong sizeEstimate = 0; for (int i = 0; i < getReceiptsMessage.Hashes.Count; i++) { txReceipts[i] = SyncServer.GetReceipts(getReceiptsMessage.Hashes[i]); for (int j = 0; j < txReceipts[i].Length; j++) { sizeEstimate += MessageSizeEstimator.EstimateSize(txReceipts[i][j]); } if (sizeEstimate > SoftOutgoingMessageSizeLimit) { break; } } return(new ReceiptsMessage(txReceipts)); }
private void Handle(GetReceiptsMessage msg) { TransactionReceipt[][] transactionReceipts = SyncServer.GetReceipts(msg.BlockHashes); Send(new ReceiptsMessage(transactionReceipts)); }
protected ReceiptsMessage FulfillReceiptsRequest(GetReceiptsMessage getReceiptsMessage) { TxReceipt[][] txReceipts = SyncServer.GetReceipts(getReceiptsMessage.Hashes); return(new ReceiptsMessage(txReceipts)); }