Skip to content

Commit 367837b

Browse files
committed
mdf NodeImpl.java Comparator
1 parent aeb4aeb commit 367837b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/tron/core/net/node/NodeImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void sendInv() {
180180
send.forEach((peer, ids) ->
181181
ids.forEach((key, value) -> {
182182
if (key.equals(InventoryType.BLOCK)) {
183-
value.sort(Comparator.comparingDouble(value1 -> new BlockId(value1).getNum()));
183+
value.sort(Comparator.comparingLong(value1 -> new BlockId(value1).getNum()));
184184
}
185185
peer.sendMessage(new InventoryMessage(value, key));
186186
}));
@@ -190,7 +190,7 @@ void sendFetch() {
190190
send.forEach((peer, ids) ->
191191
ids.forEach((key, value) -> {
192192
if (key.equals(InventoryType.BLOCK)) {
193-
value.sort(Comparator.comparingDouble(value1 -> new BlockId(value1).getNum()));
193+
value.sort(Comparator.comparingLong(value1 -> new BlockId(value1).getNum()));
194194
}
195195
peer.sendMessage(new FetchInvDataMessage(value, key));
196196
}));

0 commit comments

Comments
 (0)