mirror of
https://github.com/EvernodeXRPL/sashimono.git
synced 2026-04-29 15:38:00 +00:00
Lease representation change (#350)
This commit is contained in:
committed by
GitHub
parent
378625399f
commit
223a0f6d08
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user