File tree 3 files changed +11
-3
lines changed
consensus-utility/src/main/java/org/hiero/consensus/config
swirlds-platform-core/src/test/java/com/swirlds/platform
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public record EventConfig(
24
24
@ ConfigProperty (defaultValue = "5" ) long eventsLogPeriod ,
25
25
@ ConfigProperty (defaultValue = "/opt/hgcapp/eventsStreams" ) String eventsLogDir ,
26
26
@ ConfigProperty (defaultValue = "true" ) boolean enableEventStreaming ,
27
- @ ConfigProperty (defaultValue = "false " ) boolean useBirthRoundAncientThreshold ) {
27
+ @ ConfigProperty (defaultValue = "true " ) boolean useBirthRoundAncientThreshold ) {
28
28
29
29
/**
30
30
* @return the {@link AncientMode} based on useBirthRoundAncientThreshold
Original file line number Diff line number Diff line change 1
1
// SPDX-License-Identifier: Apache-2.0
2
2
package com .swirlds .platform .event .preconsensus ;
3
3
4
+ import static org .hiero .consensus .model .event .AncientMode .BIRTH_ROUND_THRESHOLD ;
4
5
import static org .hiero .consensus .model .event .AncientMode .GENERATION_THRESHOLD ;
5
6
6
7
import com .swirlds .base .test .fixtures .time .FakeTime ;
18
19
import java .util .List ;
19
20
import java .util .Random ;
20
21
import org .hiero .base .utility .test .fixtures .RandomUtils ;
22
+ import org .hiero .consensus .config .EventConfig_ ;
21
23
import org .hiero .consensus .model .event .AncientMode ;
22
24
import org .hiero .consensus .model .event .PlatformEvent ;
23
25
import org .hiero .consensus .model .hashgraph .EventWindow ;
@@ -40,6 +42,7 @@ class DefaultInlinePcesWriterTest {
40
42
@ BeforeEach
41
43
void beforeEach () {
42
44
final Configuration configuration = new TestConfigBuilder ()
45
+ .withValue (EventConfig_ .USE_BIRTH_ROUND_ANCIENT_THRESHOLD , ancientMode == BIRTH_ROUND_THRESHOLD )
43
46
.withValue (PcesConfig_ .DATABASE_DIRECTORY , tempDir .toString ())
44
47
.getOrCreateConfig ();
45
48
platformContext = buildContext (configuration );
Original file line number Diff line number Diff line change 14
14
15
15
import com .swirlds .common .context .PlatformContext ;
16
16
import com .swirlds .common .test .fixtures .platform .TestPlatformContextBuilder ;
17
+ import com .swirlds .config .extensions .test .fixtures .TestConfigBuilder ;
17
18
import com .swirlds .platform .gossip .NoOpIntakeEventCounter ;
18
19
import com .swirlds .platform .gossip .shadowgraph .ReservedEventWindow ;
19
20
import com .swirlds .platform .gossip .shadowgraph .ShadowEvent ;
38
39
import java .util .stream .Stream ;
39
40
import org .hiero .base .crypto .Hash ;
40
41
import org .hiero .base .utility .test .fixtures .RandomUtils ;
42
+ import org .hiero .consensus .config .EventConfig_ ;
41
43
import org .hiero .consensus .model .event .EventDescriptorWrapper ;
42
44
import org .hiero .consensus .model .event .PlatformEvent ;
43
45
import org .hiero .consensus .model .hashgraph .EventWindow ;
@@ -78,8 +80,11 @@ public void setup() {
78
80
}
79
81
80
82
private void initShadowgraph (final Random random , final int numEvents , final int numNodes ) {
81
- final PlatformContext platformContext =
82
- TestPlatformContextBuilder .create ().build ();
83
+ final PlatformContext platformContext = TestPlatformContextBuilder .create ()
84
+ .withConfiguration (new TestConfigBuilder ()
85
+ .withValue (EventConfig_ .USE_BIRTH_ROUND_ANCIENT_THRESHOLD , "false" )
86
+ .getOrCreateConfig ())
87
+ .build ();
83
88
84
89
emitter = EventEmitterBuilder .newBuilder ()
85
90
.setRandomSeed (random .nextLong ())
You can’t perform that action at this time.
0 commit comments