Send reputation only if active

This commit is contained in:
chalith
2024-05-07 13:45:03 +05:30
parent a266c2fec7
commit fb9136eb09
7 changed files with 22 additions and 15 deletions

View File

@@ -6,7 +6,7 @@
"": {
"name": "evernode-setup-helper",
"dependencies": {
"evernode-js-client": "0.6.44",
"evernode-js-client": "0.6.45",
"ip6addr": "0.2.5",
"ripple-keypairs": "1.3.1"
}
@@ -405,9 +405,9 @@
}
},
"node_modules/evernode-js-client": {
"version": "0.6.44",
"resolved": "https://registry.npmjs.org/evernode-js-client/-/evernode-js-client-0.6.44.tgz",
"integrity": "sha512-LIiGKxGRA0bgFYEOISvPCLj/wEcHM6PW0TfncmVVVk3YIfp17IIFynib1ye48scTgSoqTCX/oLD9mtQX4LZlvg==",
"version": "0.6.45",
"resolved": "https://registry.npmjs.org/evernode-js-client/-/evernode-js-client-0.6.45.tgz",
"integrity": "sha512-qG5N0BxZbW0agQih3o0TXSmUhqpdhZ4P1BvkqytBU6NUjabqkrhiDFpdkDvYwXLNpCX5Hlxm71gawQeeNWcguw==",
"dependencies": {
"elliptic": "6.5.4",
"libsodium-wrappers": "0.7.10",

View File

@@ -4,7 +4,7 @@
"build": "ncc build index.js --minify -o dist"
},
"dependencies": {
"evernode-js-client": "0.6.44",
"evernode-js-client": "0.6.45",
"ip6addr": "0.2.5",
"ripple-keypairs": "1.3.1"
}

View File

@@ -6,7 +6,7 @@
"": {
"name": "mb-xrpl",
"dependencies": {
"evernode-js-client": "0.6.42",
"evernode-js-client": "0.6.45",
"ip6addr": "0.2.5",
"sqlite3": "5.0.2"
},
@@ -1021,9 +1021,9 @@
}
},
"node_modules/evernode-js-client": {
"version": "0.6.42",
"resolved": "https://registry.npmjs.org/evernode-js-client/-/evernode-js-client-0.6.42.tgz",
"integrity": "sha512-lonrEXLdLJtLmxmkMztfLRRG/N2GaNJVecDTJPG0hEOUUBFPmFh6rchsjGv8H1oJOmIW/IPL/rkGtbVtn1rzag==",
"version": "0.6.45",
"resolved": "https://registry.npmjs.org/evernode-js-client/-/evernode-js-client-0.6.45.tgz",
"integrity": "sha512-qG5N0BxZbW0agQih3o0TXSmUhqpdhZ4P1BvkqytBU6NUjabqkrhiDFpdkDvYwXLNpCX5Hlxm71gawQeeNWcguw==",
"dependencies": {
"elliptic": "6.5.4",
"libsodium-wrappers": "0.7.10",

View File

@@ -5,7 +5,7 @@
"build": "npm run lint && ncc build app.js --minify -o dist"
},
"dependencies": {
"evernode-js-client": "0.6.42",
"evernode-js-client": "0.6.45",
"sqlite3": "5.0.2",
"ip6addr": "0.2.5"
},

View File

@@ -618,6 +618,13 @@ class ReputationD {
const scheduledMoment = await this.hostClient.getMoment();
await this.#queueAction(async (submissionRefs) => {
// Skip if host is not registered.
const hostInfo = await this.hostClient.getRegistration();
if (!hostInfo.active) {
console.log(`Skipping reputation sender since host is not active.`);
return;
}
const currentMoment = await this.hostClient.getMoment();
if (scheduledMoment == currentMoment) {

View File

@@ -7,7 +7,7 @@
"name": "reputationd",
"dependencies": {
"archiver": "5.3.1",
"evernode-js-client": "0.6.42",
"evernode-js-client": "0.6.45",
"hotpocket-js-client": "0.5.6",
"uuid": "9.0.1"
},
@@ -1021,9 +1021,9 @@
}
},
"node_modules/evernode-js-client": {
"version": "0.6.42",
"resolved": "https://registry.npmjs.org/evernode-js-client/-/evernode-js-client-0.6.42.tgz",
"integrity": "sha512-lonrEXLdLJtLmxmkMztfLRRG/N2GaNJVecDTJPG0hEOUUBFPmFh6rchsjGv8H1oJOmIW/IPL/rkGtbVtn1rzag==",
"version": "0.6.45",
"resolved": "https://registry.npmjs.org/evernode-js-client/-/evernode-js-client-0.6.45.tgz",
"integrity": "sha512-qG5N0BxZbW0agQih3o0TXSmUhqpdhZ4P1BvkqytBU6NUjabqkrhiDFpdkDvYwXLNpCX5Hlxm71gawQeeNWcguw==",
"dependencies": {
"elliptic": "6.5.4",
"libsodium-wrappers": "0.7.10",

View File

@@ -5,7 +5,7 @@
"build": "npm run lint && ncc build app.js --minify -o dist"
},
"dependencies": {
"evernode-js-client": "0.6.42",
"evernode-js-client": "0.6.45",
"hotpocket-js-client": "0.5.6",
"uuid": "9.0.1",
"archiver": "5.3.1"