Removed unnecessary env variable pass (#321)

This commit is contained in:
Chalith Desaman
2023-12-20 10:27:41 +05:30
committed by GitHub
parent beb19d4a3d
commit e99441c752
4 changed files with 9 additions and 27 deletions

View File

@@ -326,7 +326,7 @@ else
fi
if [[ "$NO_MB" == "" && -f $MB_XRPL_DATA/mb-xrpl.cfg ]]; then
! sudo -u "$MB_XRPL_USER" MB_DATA_DIR="$MB_XRPL_DATA" node "$MB_XRPL_BIN" upgrade $EVERNODE_GOVERNOR_ADDRESS && rollback
! sudo -u "$MB_XRPL_USER" MB_DATA_DIR="$MB_XRPL_DATA" node "$MB_XRPL_BIN" upgrade && rollback
fi
# Install Sashimono Agent systemd service.

View File

@@ -1795,9 +1795,6 @@ elif [ "$mode" == "list" ]; then
sashi list
elif [ "$mode" == "update" ]; then
config_json_path="$SASHIMONO_BIN/evernode-setup-helpers/configuration.json"
export EVERNODE_GOVERNOR_ADDRESS=${OVERRIDE_EVERNODE_GOVERNOR_ADDRESS:-$(jq -r ".$NETWORK.governorAddress" $config_json_path)}
update_evernode
elif [ "$mode" == "log" ]; then

View File

@@ -46,8 +46,8 @@ async function main() {
else if (process.argv.length === 4 && process.argv[2] === 'reginfo' && process.argv[3] === 'basic') {
await new Setup().regInfo(true);
}
else if (process.argv.length === 4 && process.argv[2] === 'upgrade') {
await new Setup().upgrade(process.argv[3]);
else if (process.argv.length >= 3 && process.argv[2] === 'upgrade') {
await new Setup().upgrade();
}
else if ((process.argv.length === 8) && process.argv[2] === 'reconfig') {
if (process.argv[5] == '-') process.argv[5] = null;

View File

@@ -220,7 +220,7 @@ class Setup {
}
// Upgrades existing message board data to the new version.
async upgrade(governorAddress) {
async upgrade() {
// Do a simple version change in the config.
const cfg = this.#getConfig();
@@ -230,21 +230,6 @@ class Setup {
if (!cfg.xrpl.rippledServer)
cfg.xrpl.rippledServer = appenv.DEFAULT_RIPPLED_SERVER
if (!cfg.xrpl.governorAddress) {
await setEvernodeDefaults(cfg.xrpl.network, governorAddress, cfg.xrpl.rippledServer);
const hostClient = new evernode.HostClient(cfg.xrpl.address, cfg.xrpl.secret);
await hostClient.connect();
evernode.Defaults.set({
xrplApi: hostClient.xrplApi
});
cfg.xrpl.governorAddress = governorAddress;
await hostClient.disconnect();
}
this.#saveConfig(cfg);
await Promise.resolve(); // async placeholder.
@@ -602,10 +587,10 @@ class Setup {
const acc = this.#getConfig().xrpl;
await setEvernodeDefaults(acc.network, acc.governorAddress, acc.rippledServer);
if(regularKey){
if (regularKey) {
console.log(`Setting Regular Key...`);
}
else{
else {
console.log(`Deleting Regular Key...`);
}
@@ -619,10 +604,10 @@ class Setup {
await xrplAcc.setRegularKey(regularKey);
if(regularKey){
if (regularKey) {
console.log(`Regular key ${regularKey} was assigned to account ${acc.address} successfully.`);
}
else{
}
else {
console.log(`Regular key was deleted from account ${acc.address} successfully.`);
}