From cbcbbab561631eaf21d6601acd20751b50405af8 Mon Sep 17 00:00:00 2001 From: vikinatora Date: Tue, 4 Apr 2023 14:42:00 +0300 Subject: [PATCH] Add base warp sync structure --- .../com/limechain/network/protocol/warp/WarpSync.java | 4 ++++ .../network/protocol/warp/WarpSyncController.java | 2 ++ .../network/protocol/warp/WarpSyncProtocol.java | 2 ++ .../network/protocol/warp/WarpSyncService.java | 2 ++ .../network/protocol/warp/dto/WarpSyncFragment.java | 6 ++++++ .../network/protocol/warp/dto/WarpSyncRequest.java | 2 ++ .../network/protocol/warp/dto/WarpSyncResponse.java | 10 ++++++++++ .../limechain/network/protocol/warp/WarpSyncTest.java | 2 ++ 8 files changed, 30 insertions(+) create mode 100644 src/main/java/com/limechain/network/protocol/warp/WarpSync.java create mode 100644 src/main/java/com/limechain/network/protocol/warp/WarpSyncController.java create mode 100644 src/main/java/com/limechain/network/protocol/warp/WarpSyncProtocol.java create mode 100644 src/main/java/com/limechain/network/protocol/warp/WarpSyncService.java create mode 100644 src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncFragment.java create mode 100644 src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncRequest.java create mode 100644 src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncResponse.java create mode 100644 src/test/java/com/limechain/network/protocol/warp/WarpSyncTest.java diff --git a/src/main/java/com/limechain/network/protocol/warp/WarpSync.java b/src/main/java/com/limechain/network/protocol/warp/WarpSync.java new file mode 100644 index 000000000..843767469 --- /dev/null +++ b/src/main/java/com/limechain/network/protocol/warp/WarpSync.java @@ -0,0 +1,4 @@ +package com.limechain.network.protocol.warp.dto; + +public class WarpSync { +} diff --git a/src/main/java/com/limechain/network/protocol/warp/WarpSyncController.java b/src/main/java/com/limechain/network/protocol/warp/WarpSyncController.java new file mode 100644 index 000000000..13db28507 --- /dev/null +++ b/src/main/java/com/limechain/network/protocol/warp/WarpSyncController.java @@ -0,0 +1,2 @@ +package com.limechain.network.protocol.warp;public class WarpSyncController { +} diff --git a/src/main/java/com/limechain/network/protocol/warp/WarpSyncProtocol.java b/src/main/java/com/limechain/network/protocol/warp/WarpSyncProtocol.java new file mode 100644 index 000000000..4902c3a96 --- /dev/null +++ b/src/main/java/com/limechain/network/protocol/warp/WarpSyncProtocol.java @@ -0,0 +1,2 @@ +package com.limechain.network.protocol.warp;public class WarpSyncProtocol { +} diff --git a/src/main/java/com/limechain/network/protocol/warp/WarpSyncService.java b/src/main/java/com/limechain/network/protocol/warp/WarpSyncService.java new file mode 100644 index 000000000..67a6b7ec3 --- /dev/null +++ b/src/main/java/com/limechain/network/protocol/warp/WarpSyncService.java @@ -0,0 +1,2 @@ +package com.limechain.network.protocol.warp;public class WarpSyncService { +} diff --git a/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncFragment.java b/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncFragment.java new file mode 100644 index 000000000..a4c7333a1 --- /dev/null +++ b/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncFragment.java @@ -0,0 +1,6 @@ +package com.limechain.network.protocol.warp; + +public class WarpSyncFragment { + String scaleEncodedHeader; + String scaleEncodedJustification; +} diff --git a/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncRequest.java b/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncRequest.java new file mode 100644 index 000000000..8a79c845e --- /dev/null +++ b/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncRequest.java @@ -0,0 +1,2 @@ +package com.limechain.network.protocol.warp.dto;public class WarpSyncRequest { +} diff --git a/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncResponse.java b/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncResponse.java new file mode 100644 index 000000000..f5bb20c5b --- /dev/null +++ b/src/main/java/com/limechain/network/protocol/warp/dto/WarpSyncResponse.java @@ -0,0 +1,10 @@ +package com.limechain.network.protocol.warp; + +import com.limechain.network.protocol.warp.dto.WarpSyncFragment; + +public class WarpSyncResponse { + WarpSyncFragment[] fragments; + boolean isFinished; +} + + diff --git a/src/test/java/com/limechain/network/protocol/warp/WarpSyncTest.java b/src/test/java/com/limechain/network/protocol/warp/WarpSyncTest.java new file mode 100644 index 000000000..3092de1d9 --- /dev/null +++ b/src/test/java/com/limechain/network/protocol/warp/WarpSyncTest.java @@ -0,0 +1,2 @@ +package com.limechain.network.protocol.warp;public class WarpSyncTest { +}