Skip to content

Commit b311f9a

Browse files
committed
feat(net): remove redundant code
1 parent 76df76c commit b311f9a

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

framework/src/main/java/org/tron/core/net/messagehandler/BlockMsgHandler.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,7 @@ private void processBlock(PeerConnection peer, BlockCapsule block) throws P2pExc
150150

151151
try {
152152
tronNetDelegate.processBlock(block, false);
153-
154153
witnessProductBlockService.validWitnessProductTwoBlock(block);
155-
156-
tronNetDelegate.getActivePeer().forEach(p -> {
157-
if (p.getAdvInvReceive().getIfPresent(blockId) != null) {
158-
p.setBlockBothHave(blockId);
159-
}
160-
});
161154
} catch (Exception e) {
162155
logger.warn("Process adv block {} from peer {} failed. reason: {}",
163156
blockId, peer.getInetAddress(), e.getMessage());

framework/src/main/java/org/tron/core/net/service/adv/AdvService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ public void broadcast(Message msg) {
200200
logger.info("Ready to broadcast block {}", blockMsg.getBlockId().getString());
201201
blockMsg.getBlockCapsule().getTransactions().forEach(transactionCapsule -> {
202202
Sha256Hash tid = transactionCapsule.getTransactionId();
203-
invToSpread.remove(tid);
204203
trxCache.put(new Item(tid, InventoryType.TRX),
205204
new TransactionMessage(transactionCapsule.getInstance()));
206205
});

0 commit comments

Comments
 (0)