Skip to content

Commit

Permalink
Merge pull request #2108 from kaloudis/neutrino-peers-mod
Browse files Browse the repository at this point in the history
Settings: update mainnet Netrino peers
  • Loading branch information
kaloudis authored Apr 7, 2024
2 parents 1309eb2 + e941174 commit f2dc1d3
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions stores/SettingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,8 @@ export const DEFAULT_NEUTRINO_PEERS_MAINNET = [
'btcd2.lnolymp.us',
'btcd-mainnet.lightning.computer',
'node.eldamar.icu',
'noad.sathoarder.com'
'noad.sathoarder.com',
'sg.lnolymp.us'
];

export const DEFAULT_NEUTRINO_PEERS_TESTNET = [
Expand Down Expand Up @@ -1006,7 +1007,7 @@ export default class SettingsStore {
expressGraphSync: true,
resetExpressGraphSyncOnStartup: false,
bimodalPathfinding: true,
dontAllowOtherPeers: true,
dontAllowOtherPeers: false,
neutrinoPeersMainnet: DEFAULT_NEUTRINO_PEERS_MAINNET,
neutrinoPeersTestnet: DEFAULT_NEUTRINO_PEERS_TESTNET,
zeroConfPeers: [],
Expand Down Expand Up @@ -1297,6 +1298,27 @@ export default class SettingsStore {
await EncryptedStorage.setItem(MOD_KEY2, 'true');
}

const MOD_KEY3 = 'neutrino-peers-mod1';
const mod3 = await EncryptedStorage.getItem(MOD_KEY3);
if (!mod3) {
const neutrinoPeersMainnetOld = [
'btcd1.lnolymp.us',
'btcd2.lnolymp.us',
'btcd-mainnet.lightning.computer',
'node.eldamar.icu',
'noad.sathoarder.com'
];
if (
JSON.stringify(this.settings?.neutrinoPeersMainnet) ===
JSON.stringify(neutrinoPeersMainnetOld)
) {
this.settings.neutrinoPeersMainnet =
DEFAULT_NEUTRINO_PEERS_MAINNET;
}
this.setSettings(JSON.stringify(this.settings));
await EncryptedStorage.setItem(MOD_KEY3, 'true');
}

// migrate old POS squareEnabled setting to posEnabled
if (this.settings?.pos?.squareEnabled) {
this.settings.pos.posEnabled = PosEnabled.Square;
Expand Down

0 comments on commit f2dc1d3

Please sign in to comment.