Skip to content
Snippets Groups Projects
Commit 9a6d1084 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[enh] Add option to enable/disable listen peer on Duniter node

parent 3484562f
No related branches found
No related tags found
No related merge requests found
Pipeline #4294 failed
...@@ -136,6 +136,11 @@ duniter.blockchain.enable: true ...@@ -136,6 +136,11 @@ duniter.blockchain.enable: true
# duniter.blockchain.reload.from: 18900 # duniter.blockchain.reload.from: 18900
# duniter.blockchain.reload.to: 19000 # duniter.blockchain.reload.to: 19000
# #
# Enabling blockchain peers indexation ? (default: ${duniter.blockchain.enable})
# This will listen new peer events on the Duniter node (using BMA /ws/peer)
#
# duniter.blockchain.peer.enable: false
#
# Duniter node address # Duniter node address
# #
duniter.host: g1.duniter.org duniter.host: g1.duniter.org
......
...@@ -268,7 +268,7 @@ public class PluginInit extends AbstractLifecycleComponent<PluginInit> { ...@@ -268,7 +268,7 @@ public class PluginInit extends AbstractLifecycleComponent<PluginInit> {
} }
// Index peers (and listen if new peer appear) // Index peers (and listen if new peer appear)
if (pluginSettings.enableSynchroDiscovery()) { if (pluginSettings.enableBlockchainPeerIndexation()) {
injector.getInstance(PeerService.class) injector.getInstance(PeerService.class)
.listenAndIndexPeers(peer); .listenAndIndexPeers(peer);
} }
......
...@@ -247,6 +247,10 @@ public class PluginSettings extends AbstractLifecycleComponent<PluginSettings> { ...@@ -247,6 +247,10 @@ public class PluginSettings extends AbstractLifecycleComponent<PluginSettings> {
return settings.getAsBoolean("duniter.blockchain.enable", false); return settings.getAsBoolean("duniter.blockchain.enable", false);
} }
public boolean enableBlockchainPeerIndexation() {
return settings.getAsBoolean("duniter.blockchain.peer.enable", enableBlockchainIndexation());
}
public boolean reloadBlockchainIndices() { public boolean reloadBlockchainIndices() {
return settings.getAsBoolean("duniter.blockchain.reload", false); return settings.getAsBoolean("duniter.blockchain.reload", false);
} }
......
#release configuration
#Mon Jan 07 18:40:52 CET 2019
projectVersionPolicyId=default
scm.tagNameFormat=@{project.artifactId}-@{project.version}
exec.additionalArguments=-DskipTests -DperformFullRelease
remoteTagging=true
scm.commentPrefix=[maven-release-plugin]
pushChanges=true
completedPhase=check-poms
scm.url=scm\:git\:git@git.duniter.org\:clients/cesium-grp/cesium-plus-pod.git
exec.snapshotReleasePluginAllowed=false
preparationGoals=verify
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment