15
15
*/
16
16
package maru.config
17
17
18
- import com.sksamuel.hoplite.Secret
19
18
import java.net.URI
20
19
import kotlin.io.path.Path
21
20
import kotlin.time.Duration.Companion.milliseconds
22
21
import kotlin.time.Duration.Companion.seconds
23
- import maru.extensions.fromHexToByteArray
24
22
import org.assertj.core.api.Assertions.assertThat
25
23
import org.junit.jupiter.api.Test
26
24
@@ -38,9 +36,10 @@ class HopliteFriendlinessTest {
38
36
39
37
[p2p-config]
40
38
port = 3322
39
+ ip-address = "localhost"
40
+ static-peers = []
41
41
42
42
[validator]
43
- private-key = "0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae"
44
43
jwt-secret-path = "/secret/path"
45
44
el-client-engine-api-endpoint = "http://localhost:8555"
46
45
""" .trimIndent()
@@ -66,11 +65,10 @@ class HopliteFriendlinessTest {
66
65
endpoint = URI .create(" http://localhost:8545" ).toURL(),
67
66
),
68
67
qbftOptions = QbftOptions (100 .milliseconds),
69
- p2pConfig = P2P (),
68
+ p2pConfig = P2P (ipAddress = " localhost " , port = " 3322 " , staticPeers = emptyList() ),
70
69
validator =
71
70
ValidatorDtoToml (
72
71
elClientEngineApiEndpoint = URI .create(" http://localhost:8555" ).toURL(),
73
- privateKey = Secret (" 0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae" ),
74
72
jwtSecretPath = " /secret/path" ,
75
73
),
76
74
followerEngineApis =
@@ -100,11 +98,10 @@ class HopliteFriendlinessTest {
100
98
endpoint = URI .create(" http://localhost:8545" ).toURL(),
101
99
),
102
100
qbftOptions = QbftOptions (100 .milliseconds),
103
- p2pConfig = P2P (),
101
+ p2pConfig = P2P (ipAddress = " localhost " , port = " 3322 " , staticPeers = emptyList() ),
104
102
validator =
105
103
ValidatorDtoToml (
106
104
elClientEngineApiEndpoint = URI .create(" http://localhost:8555" ).toURL(),
107
- privateKey = Secret (" 0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae" ),
108
105
jwtSecretPath = " /secret/path" ,
109
106
),
110
107
followerEngineApis = null ,
@@ -123,11 +120,10 @@ class HopliteFriendlinessTest {
123
120
ApiEndpointConfig (
124
121
endpoint = URI .create(" http://localhost:8545" ).toURL(),
125
122
),
126
- p2pConfig = P2P (),
123
+ p2pConfig = P2P (ipAddress = " localhost " , port = " 3322 " , staticPeers = emptyList() ),
127
124
validator =
128
125
Validator (
129
126
engineApiClient = ApiEndpointConfig (URI .create(" http://localhost:8555" ).toURL()),
130
- privateKey = " 0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae" .fromHexToByteArray(),
131
127
),
132
128
qbftOptions = QbftOptions (100 .milliseconds),
133
129
followers =
@@ -154,11 +150,10 @@ class HopliteFriendlinessTest {
154
150
endpoint = URI .create(" http://localhost:8545" ).toURL(),
155
151
),
156
152
qbftOptions = QbftOptions (100 .milliseconds),
157
- p2pConfig = P2P (),
153
+ p2pConfig = P2P (ipAddress = " localhost " , port = " 3322 " , staticPeers = emptyList() ),
158
154
validator =
159
155
Validator (
160
156
engineApiClient = ApiEndpointConfig (URI .create(" http://localhost:8555" ).toURL()),
161
- privateKey = " 0x1dd171cec7e2995408b5513004e8207fe88d6820aeff0d82463b3e41df251aae" .fromHexToByteArray(),
162
157
),
163
158
followers =
164
159
FollowersConfig (
0 commit comments