Skip to content

Commit 9556ad1

Browse files
authored
Merge pull request #1061 from tronprotocol/release-fix-1057
Fix #1057
2 parents 579ea95 + 701cdaa commit 9556ad1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/org/tron/core/net/node/NodeImpl.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -706,13 +706,15 @@ private void onHandleInventoryMessage(PeerConnection peer, InventoryMessage msg)
706706
peer.getAdvObjSpreadToUs().put(id, System.currentTimeMillis());
707707
if (!requested[0]) {
708708
if (!badAdvObj.containsKey(id)) {
709-
if (!advObjToFetch.containsKey(id)) {
709+
PriorItem targetPriorItem = this.advObjToFetch.get(id);
710+
711+
if (targetPriorItem != null) {
712+
//another peer tell this trx to us, refresh its time.
713+
targetPriorItem.refreshTime();
714+
} else {
710715
fetchWaterLine.increase();
711716
this.advObjToFetch.put(id, new PriorItem(new Item(id, msg.getInventoryType()),
712717
fetchSequenceCounter.incrementAndGet()));
713-
} else {
714-
//another peer tell this trx to us, refresh its time.
715-
this.advObjToFetch.get(id).refreshTime();
716718
}
717719
}
718720
}

0 commit comments

Comments
 (0)