Skip to content

Commit 747e2c7

Browse files
committed
add log4j topic
1 parent 30fe28c commit 747e2c7

10 files changed

Lines changed: 11 additions & 10 deletions

‎src/main/java/org/tron/core/net/TronNetDelegate.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import org.tron.core.net.peer.PeerConnection;
4848
import org.tron.protos.Protocol.Inventory.InventoryType;
4949

50-
@Slf4j
50+
@Slf4j(topic = "net")
5151
@Component
5252
public class TronNetDelegate {
5353

‎src/main/java/org/tron/core/net/TronNetService.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.tron.core.net.service.SyncService;
2121
import org.tron.protos.Protocol.ReasonCode;
2222

23-
@Slf4j
23+
@Slf4j(topic = "net")
2424
@Component
2525
public class TronNetService {
2626

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.tron.core.services.WitnessProductBlockService;
2222
import org.tron.protos.Protocol.Inventory.InventoryType;
2323

24-
@Slf4j
24+
@Slf4j(topic = "net")
2525
@Component
2626
public class BlockMsgHandler implements TronMsgHandler {
2727

‎src/main/java/org/tron/core/net/messagehandler/ChainInventoryMsgHandler.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.tron.core.net.peer.PeerConnection;
2121
import org.tron.core.net.service.SyncService;
2222

23-
@Slf4j
23+
@Slf4j(topic = "net")
2424
@Component
2525
public class ChainInventoryMsgHandler implements TronMsgHandler {
2626

@@ -64,6 +64,7 @@ public void processMessage(PeerConnection peer, TronMessage msg) throws P2pExcep
6464
while (!peer.getSyncBlockToFetch().isEmpty() && tronNetDelegate
6565
.containBlock(peer.getSyncBlockToFetch().peek())) {
6666
BlockId blockId = peer.getSyncBlockToFetch().pop();
67+
peer.setBlockBothHave(blockId);
6768
logger.info("Block {} from {} is processed", blockId.getString(), peer.getNode().getHost());
6869
}
6970
}

‎src/main/java/org/tron/core/net/messagehandler/FetchInvDataMsgHandler.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.tron.protos.Protocol.ReasonCode;
2929
import org.tron.protos.Protocol.Transaction;
3030

31-
@Slf4j
31+
@Slf4j(topic = "net")
3232
@Component
3333
public class FetchInvDataMsgHandler implements TronMsgHandler {
3434

‎src/main/java/org/tron/core/net/messagehandler/InventoryMsgHandler.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import org.tron.core.net.service.AdvService;
1313
import org.tron.protos.Protocol.Inventory.InventoryType;
1414

15-
@Slf4j
15+
@Slf4j(topic = "net")
1616
@Component
1717
public class InventoryMsgHandler implements TronMsgHandler {
1818

‎src/main/java/org/tron/core/net/messagehandler/SyncBlockChainMsgHandler.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import org.tron.core.net.message.TronMessage;
1717
import org.tron.core.net.peer.PeerConnection;
1818

19-
@Slf4j
19+
@Slf4j(topic = "net")
2020
@Component
2121
public class SyncBlockChainMsgHandler implements TronMsgHandler {
2222

‎src/main/java/org/tron/core/net/peer/PeerStatusCheck.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import org.tron.core.net.TronNetDelegate;
1111
import org.tron.protos.Protocol.ReasonCode;
1212

13-
@Slf4j
13+
@Slf4j(topic = "net")
1414
@Component
1515
public class PeerStatusCheck {
1616

‎src/main/java/org/tron/core/net/service/AdvService.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import org.tron.core.net.peer.PeerConnection;
3737
import org.tron.protos.Protocol.Inventory.InventoryType;
3838

39-
@Slf4j
39+
@Slf4j(topic = "net")
4040
@Component
4141
public class AdvService {
4242

‎src/main/java/org/tron/core/net/service/SyncService.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.tron.protos.Protocol.Inventory.InventoryType;
3434
import org.tron.protos.Protocol.ReasonCode;
3535

36-
@Slf4j
36+
@Slf4j(topic = "net")
3737
@Component
3838
public class SyncService {
3939

0 commit comments

Comments
 (0)