File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
framework/src/main/java/org/tron/core/net/service/sync Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -209,11 +209,12 @@ private LinkedList<BlockId> getBlockChainSummary(PeerConnection peer) throws P2p
209
209
}
210
210
211
211
private BlockId getBlockIdByNum (long num ) throws P2pException {
212
- BlockId head = tronNetDelegate .getHeadBlockId ();
213
- if (num > head .getNum ()) {
214
- return tronNetDelegate .getKhaosDbHeadBlockId ();
215
- } else if (num == head .getNum ()) {
216
- return head ;
212
+ BlockId head1 = tronNetDelegate .getKhaosDbHeadBlockId ();
213
+ BlockId head2 = tronNetDelegate .getHeadBlockId ();
214
+ if (num == head1 .getNum ()) {
215
+ return head1 ;
216
+ } else if (num == head2 .getNum ()) {
217
+ return head2 ;
217
218
}
218
219
return tronNetDelegate .getBlockIdByNum (num );
219
220
}
You can’t perform that action at this time.
0 commit comments