Skip to content

Commit 9d6027a

Browse files
committed
fix(config): add event.subscribe.enable config key and remove incorrect --fast-forward mapping
- Add event.subscribe.enable as config equivalent for deprecated --es CLI flag - Remove --fast-forward from CLI-to-config mapping (no config equivalent; fast-forward is a node runtime mode, not a config option) - Config reads event.subscribe.enable with CLI --es taking priority
1 parent 5b0e37b commit 9d6027a

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

framework/src/main/java/org/tron/core/config/args/Args.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ public class Args extends CommonParameter {
114114
m.put("--validate-sign-thread", "node.validateSignThreadNum");
115115
m.put("--trust-node", "node.trustNode");
116116
m.put("--history-balance-lookup", "storage.balance.history.lookup");
117-
m.put("--es", "event.subscribe");
118-
m.put("--fast-forward", "node.fastForward");
117+
m.put("--es", "event.subscribe.enable");
119118
DEPRECATED_CLI_TO_CONFIG = Collections.unmodifiableMap(m);
120119
}
121120

@@ -697,6 +696,9 @@ public static void applyConfigParams(
697696
PARAMETER.eventFilter =
698697
config.hasPath(ConfigKey.EVENT_SUBSCRIBE_FILTER) ? getEventFilter(config) : null;
699698

699+
PARAMETER.eventSubscribe = config.hasPath(ConfigKey.EVENT_SUBSCRIBE_ENABLE)
700+
&& config.getBoolean(ConfigKey.EVENT_SUBSCRIBE_ENABLE);
701+
700702
if (config.hasPath(ConfigKey.ALLOW_SHIELDED_TRANSACTION_API)) {
701703
PARAMETER.allowShieldedTransactionApi =
702704
config.getBoolean(ConfigKey.ALLOW_SHIELDED_TRANSACTION_API);

framework/src/main/java/org/tron/core/config/args/ConfigKey.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ private ConfigKey() {
272272

273273
// event
274274
public static final String EVENT_SUBSCRIBE = "event.subscribe";
275+
public static final String EVENT_SUBSCRIBE_ENABLE = "event.subscribe.enable";
275276
public static final String EVENT_SUBSCRIBE_FILTER = "event.subscribe.filter";
276277
public static final String EVENT_SUBSCRIBE_VERSION = "event.subscribe.version";
277278
public static final String EVENT_SUBSCRIBE_START_SYNC_BLOCK_NUM =

framework/src/main/resources/config.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,7 @@ committee = {
762762
}
763763

764764
event.subscribe = {
765+
enable = false // enable event subscribe, replaces deprecated CLI flag --es
765766
native = {
766767
useNativeQueue = true // if true, use native message queue, else use event plugin.
767768
bindport = 5555 // bind port

0 commit comments

Comments
 (0)