Skip to content

Commit

Permalink
Seednode accounting set by command line, overrides UserPreferences.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacxx committed Jun 30, 2023
1 parent 8c70dd6 commit a9bc45c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions core/src/main/java/bisq/core/user/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand All @@ -189,6 +189,7 @@ public Preferences(PersistenceManager<PreferencesPayload> persistenceManager,
@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) {
Expand All @@ -200,6 +201,7 @@ public Preferences(PersistenceManager<PreferencesPayload> persistenceManager,
this.btcNodesFromOptions = btcNodesFromOptions;
this.referralIdFromOptions = referralId;
this.fullDaoNodeFromOptions = fullDaoNode;
this.fullAccountingNodeFromOptions = fullAccountingNode;
this.rpcUserFromOptions = rpcUser;
this.rpcPwFromOptions = rpcPassword;
this.blockNotifyPortFromOptions = rpcBlockNotificationPort;
Expand Down Expand Up @@ -1018,7 +1020,7 @@ public List<String> getDefaultTxBroadcastServices() {
}

public boolean isProcessBurningManAccountingData() {
return prefPayload.isProcessBurningManAccountingData();
return fullAccountingNodeFromOptions || prefPayload.isProcessBurningManAccountingData();
}


Expand Down
2 changes: 1 addition & 1 deletion core/src/test/java/bisq/core/user/PreferencesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void setUp() {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit a9bc45c

Please sign in to comment.