Skip to content

Commit ecb0009

Browse files
committed
log infos for devP2P infos that could not get processed.
1 parent 53430bd commit ecb0009

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

crates/ethcore/sync/src/chain/handler.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ impl SyncHandler {
879879
// in the worst case we are refetching a transaction that we already have.
880880

881881
if deadline.is_expired() {
882+
debug!(target: "sync", "{}: deadline reached while processing pooled transactions", peer_id);
882883
// we did run out of time to finish this opation, but thats Ok.
883884
return Ok(());
884885
}

crates/ethcore/sync/src/chain/supplier.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ impl SyncSupplier {
323323
if let Ok(hash) = v.as_val::<H256>() {
324324
// io.chain().transaction(hash)
325325

326-
if !deadline.should_continue() {
326+
if deadline.is_expired() {
327+
debug!(target: "sync", "{} -> GetPooledTransactions: deadline reached, only returning partial result to ", peer_id);
327328
break;
328329
}
329330

crates/rpc/src/v1/tests/helpers/miner_service.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
1919
use std::{
2020
collections::{BTreeMap, BTreeSet, HashMap},
21-
sync::Arc, time::Duration,
21+
sync::Arc,
22+
time::Duration,
2223
};
2324

2425
use crate::{
@@ -254,7 +255,11 @@ impl MinerService for TestMinerService {
254255
.map(|tx| Arc::new(VerifiedTransaction::from_pending_block_transaction(tx)))
255256
}
256257

257-
fn transaction_if_readable(&self, hash: &H256, max_duration: &Duration) -> Option<Arc<VerifiedTransaction>> {
258+
fn transaction_if_readable(
259+
&self,
260+
hash: &H256,
261+
max_duration: &Duration,
262+
) -> Option<Arc<VerifiedTransaction>> {
258263
self.pending_transactions
259264
.try_lock_for(*max_duration)?
260265
.get(hash)

0 commit comments

Comments
 (0)