From 77f97614af3b5732b0567687e2f18903eb2e00f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neboj=C5=A1a=20Obradovi=C4=87?= Date: Mon, 15 Apr 2019 13:17:10 +0200 Subject: [PATCH] Mariner release v2.0.53 (#918) - Increase update check period. - Fix listener scrip. - Fix upgrading the container when certs are in /ot-node/ dir. - Support setting RPC URL using command line param. --- modules/command/common/autoupdater-command.js | 2 +- package-lock.json | 2 +- package.json | 2 +- testnet/register-node.js | 9 ++++++++- testnet/supervisor-event-listener.py | 1 + 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/command/common/autoupdater-command.js b/modules/command/common/autoupdater-command.js index 0e371764a..1d1fd51f7 100644 --- a/modules/command/common/autoupdater-command.js +++ b/modules/command/common/autoupdater-command.js @@ -126,7 +126,7 @@ class AutoupdaterCommand extends Command { name: 'autoupdaterCommand', data: { }, - period: 2 * 60 * 1000, + period: 6 * 60 * 60 * 1000, transactional: false, }; Object.assign(command, map); diff --git a/package-lock.json b/package-lock.json index 9829b2299..f542d17df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "2.0.52", + "version": "2.0.53", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d0465783a..58f339881 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "2.0.52", + "version": "2.0.53", "description": "OriginTrail node", "main": ".eslintrc.js", "config": { diff --git a/testnet/register-node.js b/testnet/register-node.js index bfa8b8d97..e53840722 100644 --- a/testnet/register-node.js +++ b/testnet/register-node.js @@ -132,7 +132,7 @@ function upgradeContainer() { execSync(`mkdir -p ${initPath}`); execSync( - 'find . ! -path . -a -not \\( -name ".origintrail_noderc" -o -name "init" -o -name "data" \\) -maxdepth 1 -exec mv {} init/ \\;', + 'find . ! -path . -a -not \\( -name ".origintrail_noderc" -o -name "init" -o -name "data" -o -name "certs" \\) -maxdepth 1 -exec mv {} init/ \\;', { cwd: basePath }, ); execSync(`rm -rf ${path.join(initPath, 'node_modules')}`); @@ -191,6 +191,13 @@ function main() { externalConfig = JSON.parse(fs.readFileSync(localConfigPath, 'utf8')); } + if (process.env.RPC_SERVER_URL) { + if (externalConfig.blockchain === undefined) { + externalConfig.blockchain = {}; + } + externalConfig.blockchain.rpc_server_url = process.env.RPC_SERVER_URL; + } + if (!externalConfig.blockchain || !externalConfig.blockchain.rpc_server_url) { logger.error('Please provide a valid RPC server URL.\n' + 'Add it to the blockchain section. For example:\n' + diff --git a/testnet/supervisor-event-listener.py b/testnet/supervisor-event-listener.py index 7a1cc4c97..bc3c8135b 100644 --- a/testnet/supervisor-event-listener.py +++ b/testnet/supervisor-event-listener.py @@ -1,4 +1,5 @@ import sys +import os def write_stdout(s): # only eventlistener protocol messages may be sent to stdout