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