Skip to content

Commit

Permalink
Merge pull request #1918 from tronprotocol/Odyssey_v3.2.4
Browse files Browse the repository at this point in the history
remove trx trace info
  • Loading branch information
wubin12 authored Jan 14, 2019
2 parents 471f463 + cfca95d commit fbc69ce
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/main/java/org/tron/core/net/node/NodeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,20 +328,24 @@ public void setPool(SyncPool pool) {
}

public void broadcast(Message msg) {
InventoryType type;
if (msg instanceof BlockMessage) {
logger.info("Ready to broadcast block {}", ((BlockMessage) msg).getBlockId());
freshBlockId.offer(((BlockMessage) msg).getBlockId());
BlockCache.put(msg.getMessageId(), (BlockMessage) msg);
type = InventoryType.BLOCK;
} else if (msg instanceof TransactionMessage) {
TrxCache.put(msg.getMessageId(), (TransactionMessage) msg);
type = InventoryType.TRX;
} else {
return;
}
synchronized (advObjToSpread) {
advObjToSpread.put(msg.getMessageId(), type);
try {
InventoryType type;
if (msg instanceof BlockMessage) {
logger.info("Ready to broadcast block {}", ((BlockMessage) msg).getBlockId());
freshBlockId.offer(((BlockMessage) msg).getBlockId());
BlockCache.put(msg.getMessageId(), (BlockMessage) msg);
type = InventoryType.BLOCK;
} else if (msg instanceof TransactionMessage) {
TrxCache.put(msg.getMessageId(), new TransactionMessage(msg.getData()));
type = InventoryType.TRX;
} else {
return;
}
synchronized (advObjToSpread) {
advObjToSpread.put(msg.getMessageId(), type);
}
} catch (Exception e) {
logger.error("Broadcast message failed, type: {}, reason: {}", msg.getType(), e.getMessage());
}
}

Expand Down

0 comments on commit fbc69ce

Please sign in to comment.