diff --git a/installer/prereq.sh b/installer/prereq.sh index 03fc898..c6defb0 100755 --- a/installer/prereq.sh +++ b/installer/prereq.sh @@ -19,7 +19,7 @@ cgrulesengd_service=$1 # cgroups rules engine service name [ -z "$cgrulesengd_service" ] && cgrulesengd_service="cgrulesengd" function stage() { - echo "[STAGE]" "$1" # This is picked up by the setup console output filter. + echo "STAGE $1" # This is picked up by the setup console output filter. } stage "Installing dependencies" diff --git a/installer/setup.sh b/installer/setup.sh index e990f24..39282ea 100755 --- a/installer/setup.sh +++ b/installer/setup.sh @@ -1475,6 +1475,7 @@ WantedBy=timers.target" >/etc/systemd/system/$EVERNODE_AUTO_UPDATE_SERVICE.timer local cfg_lease_amount=$(jq '.xrpl.leaseAmount' $mbconfig) local cfg_rippled_server=$(jq -r '.xrpl.rippledServer' $mbconfig) local cfg_extra_txn_fee=$(jq '.xrpl.affordableExtraFee' $mbconfig) + [[ "$cfg_extra_txn_fee" == "null" ]] && cfg_extra_txn_fee=0 local cfg_ipv6_subnet=$(jq -r '.networking.ipv6.subnet' $mbconfig) local cfg_ipv6_net_interface=$(jq -r '.networking.ipv6.interface' $mbconfig) diff --git a/mb-xrpl/lib/setup.js b/mb-xrpl/lib/setup.js index 4f72cbd..2b5c8e5 100644 --- a/mb-xrpl/lib/setup.js +++ b/mb-xrpl/lib/setup.js @@ -479,11 +479,12 @@ class Setup { }); const [evrBalance, hostInfo, totalLeases, offeredLeases, unofferedLeases] = await Promise.all( - [hostClient.getEVRBalance(), - hostClient.getRegistration(), - hostClient.getLeases(), - hostClient.getLeaseOffers(), - hostClient.getUnofferedLeases() + [ + hostClient.getEVRBalance(), + hostClient.getRegistration(), + hostClient.getLeases(), + hostClient.getLeaseOffers(), + hostClient.getUnofferedLeases() ]); if (hostInfo) { @@ -494,11 +495,12 @@ class Setup { throw 'Host is not registered'; } console.log(`EVR balance: ${evrBalance}`); - if (totalLeases.length > 0) { - console.log(`Available Lease offers: ${offeredLeases.length} out of ${totalLeases.length}`); - console.log(`Pending Lease offers: ${unofferedLeases.length} out of ${totalLeases.length}`); - if (unofferedLeases.length) + if (hostInfo.maxInstances > 0) { + console.log(`Available Lease offers: ${offeredLeases.length} out of ${hostInfo.maxInstances}`); + if (unofferedLeases.length > 0) { + console.log(`Lease offers to be created: ${unofferedLeases.length} out of ${totalLeases.length}`); console.log('NOTE: Please use `evernode offerlease` command to create leases for the instances.') + } } console.log(`\nHost status: ${hostInfo.active ? 'active' : 'inactive'}`);