|
3 | 3 |
|
4 | 4 | import static java.util.Objects.requireNonNull;
|
5 | 5 |
|
| 6 | +import com.hedera.hapi.node.base.SemanticVersion; |
| 7 | +import com.hedera.node.config.converter.SemanticVersionConverter; |
6 | 8 | import com.swirlds.common.config.StateCommonConfig_;
|
7 | 9 | import com.swirlds.common.io.config.FileSystemManagerConfig_;
|
8 | 10 | import com.swirlds.config.api.Configuration;
|
9 | 11 | import com.swirlds.config.extensions.sources.SimpleConfigSource;
|
10 | 12 | import com.swirlds.config.extensions.test.fixtures.TestConfigBuilder;
|
11 | 13 | import com.swirlds.platform.config.BasicConfig_;
|
| 14 | +import com.swirlds.platform.event.preconsensus.PcesConfig_; |
12 | 15 | import com.swirlds.platform.wiring.PlatformSchedulersConfig_;
|
13 | 16 | import edu.umd.cs.findbugs.annotations.NonNull;
|
14 | 17 | import java.nio.file.Path;
|
|
21 | 24 | */
|
22 | 25 | public class TurtleNodeConfiguration implements NodeConfiguration<TurtleNodeConfiguration> {
|
23 | 26 |
|
| 27 | + public static final String SOFTWARE_VERSION = "turtle.software.version"; |
| 28 | + |
24 | 29 | private final Map<String, String> overriddenProperties = new HashMap<>();
|
25 | 30 | private final Path outputDirectory;
|
26 | 31 |
|
@@ -50,16 +55,28 @@ Configuration createConfiguration() {
|
50 | 55 | */
|
51 | 56 | @Override
|
52 | 57 | @NonNull
|
53 |
| - public TurtleNodeConfiguration set(@NonNull String key, boolean value) { |
| 58 | + public TurtleNodeConfiguration set(@NonNull final String key, final boolean value) { |
54 | 59 | overriddenProperties.put(key, Boolean.toString(value));
|
55 | 60 | return this;
|
56 | 61 | }
|
57 | 62 |
|
| 63 | + /** |
| 64 | + * {@inheritDoc} |
| 65 | + */ |
| 66 | + @Override |
| 67 | + @NonNull |
| 68 | + public TurtleNodeConfiguration set(@NonNull final String key, @NonNull final String value) { |
| 69 | + overriddenProperties.put(key, value); |
| 70 | + return this; |
| 71 | + } |
| 72 | + |
58 | 73 | private TestConfigBuilder createBasicConfigBuilder() {
|
59 | 74 | return new TestConfigBuilder()
|
| 75 | + .withConverter(SemanticVersion.class, new SemanticVersionConverter()) |
60 | 76 | .withValue(PlatformSchedulersConfig_.CONSENSUS_EVENT_STREAM, "NO_OP")
|
61 |
| - .withValue(BasicConfig_.JVM_PAUSE_DETECTOR_SLEEP_MS, "0") |
| 77 | + .withValue(BasicConfig_.JVM_PAUSE_DETECTOR_SLEEP_MS, 0) |
62 | 78 | .withValue(StateCommonConfig_.SAVED_STATE_DIRECTORY, outputDirectory.toString())
|
63 |
| - .withValue(FileSystemManagerConfig_.ROOT_PATH, outputDirectory.toString()); |
| 79 | + .withValue(FileSystemManagerConfig_.ROOT_PATH, outputDirectory.toString()) |
| 80 | + .withValue(PcesConfig_.LIMIT_REPLAY_FREQUENCY, false); |
64 | 81 | }
|
65 | 82 | }
|
0 commit comments