Skip to content

Commit

Permalink
remove trx trace info
Browse files Browse the repository at this point in the history
  • Loading branch information
xxo1shine committed Jan 8, 2019
1 parent 471f463 commit 5032213
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 5032213

Please sign in to comment.