Seednode accounting set by command line, overrides UserPreferences.

This commit is contained in:
jmacxx 2023-06-30 10:10:23 -05:00
parent 8c70dd650c
commit a9bc45c173
No known key found for this signature in database
GPG Key ID: 155297BABFE94A1B
3 changed files with 6 additions and 4 deletions

View File

@ -172,7 +172,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
private final String btcNodesFromOptions, referralIdFromOptions,
rpcUserFromOptions, rpcPwFromOptions;
private final int blockNotifyPortFromOptions;
private final boolean fullDaoNodeFromOptions;
private final boolean fullDaoNodeFromOptions, fullAccountingNodeFromOptions;
@Getter
private final BooleanProperty useStandbyModeProperty = new SimpleBooleanProperty(prefPayload.isUseStandbyMode());
@ -189,6 +189,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
@Named(Config.BTC_NODES) String btcNodesFromOptions,
@Named(Config.REFERRAL_ID) String referralId,
@Named(Config.FULL_DAO_NODE) boolean fullDaoNode,
@Named(Config.IS_BM_FULL_NODE) boolean fullAccountingNode,
@Named(Config.RPC_USER) String rpcUser,
@Named(Config.RPC_PASSWORD) String rpcPassword,
@Named(Config.RPC_BLOCK_NOTIFICATION_PORT) int rpcBlockNotificationPort) {
@ -200,6 +201,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
this.btcNodesFromOptions = btcNodesFromOptions;
this.referralIdFromOptions = referralId;
this.fullDaoNodeFromOptions = fullDaoNode;
this.fullAccountingNodeFromOptions = fullAccountingNode;
this.rpcUserFromOptions = rpcUser;
this.rpcPwFromOptions = rpcPassword;
this.blockNotifyPortFromOptions = rpcBlockNotificationPort;
@ -1018,7 +1020,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
}
public boolean isProcessBurningManAccountingData() {
return prefPayload.isProcessBurningManAccountingData();
return fullAccountingNodeFromOptions || prefPayload.isProcessBurningManAccountingData();
}

View File

@ -62,7 +62,7 @@ public class PreferencesTest {
LocalBitcoinNode localBitcoinNode = new LocalBitcoinNode(config);
preferences = new Preferences(
persistenceManager, config, null, localBitcoinNode, null, null, Config.DEFAULT_FULL_DAO_NODE,
null, null, Config.UNSPECIFIED_PORT);
false, null, null, Config.UNSPECIFIED_PORT);
}
@Test

View File

@ -47,7 +47,7 @@ public class PreferenceMakers {
lookup.valueOf(localBitcoinNode, new SameValueDonor<LocalBitcoinNode>(null)),
lookup.valueOf(useTorFlagFromOptions, new SameValueDonor<String>(null)),
lookup.valueOf(referralID, new SameValueDonor<String>(null)),
Config.DEFAULT_FULL_DAO_NODE, null, null, Config.UNSPECIFIED_PORT);
Config.DEFAULT_FULL_DAO_NODE, false, null, null, Config.UNSPECIFIED_PORT);
public static final Preferences empty = make(a(Preferences));