Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Velkovski authored and Boris Velkovski committed Apr 12, 2023
1 parent 5fbd226 commit bd91790
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@

public interface SyncController {
CompletableFuture<SyncMessage.BlockResponse> send(SyncMessage.BlockRequest msg);

private static byte[] blockNumberToByteArray(int blockNumber) {
byte byte1= (byte)(blockNumber);
byte byte2= (byte)(blockNumber>>>8);
byte byte3= (byte)(blockNumber>>>16);
byte byte4= (byte)(blockNumber>>>24);
byte byte5= (byte)(blockNumber>>>32);
return new byte[] {byte1,byte2,byte3,byte4,byte5};
byte byte1 = (byte) (blockNumber);
byte byte2 = (byte) (blockNumber >>> 8);
byte byte3 = (byte) (blockNumber >>> 16);
byte byte4 = (byte) (blockNumber >>> 24);
byte byte5 = (byte) (blockNumber >>> 32);
return new byte[]{byte1, byte2, byte3, byte4, byte5};
}

default CompletableFuture<SyncMessage.BlockResponse> sendBlockRequest(int fields,
Expand Down

0 comments on commit bd91790

Please sign in to comment.