@beblurt/blurt-nodes-checker 1.0.1 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -83
- package/dist/blurt-nodes-checker.min.js +79 -5
- package/lib/helpers/index.d.ts +27 -19
- package/lib/helpers/index.js +20 -0
- package/lib/helpers/index.js.map +1 -1
- package/lib/index.d.ts +6 -5
- package/lib/index.js +116 -113
- package/lib/index.js.map +1 -1
- package/lib/test.d.ts +3 -1
- package/lib/test.js +86 -13
- package/lib/test.js.map +1 -1
- package/package.json +12 -12
- package/lib/helpers/BLOCK_API/GET_BLOCK.d.ts +0 -26
- package/lib/helpers/BLOCK_API/GET_BLOCK.js +0 -2
- package/lib/helpers/BLOCK_API/GET_BLOCK.js.map +0 -1
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.d.ts +0 -67
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.js +0 -2
- package/lib/helpers/CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.d.ts +0 -73
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_ACCOUNT.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.d.ts +0 -7
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_BLOG_ENTRY.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_CONFIG.d.ts +0 -174
- package/lib/helpers/CONDENSER_API/GET_CONFIG.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_CONFIG.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_CONTENT.d.ts +0 -54
- package/lib/helpers/CONDENSER_API/GET_CONTENT.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_CONTENT.js.map +0 -1
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.d.ts +0 -39
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.js +0 -2
- package/lib/helpers/CONDENSER_API/GET_DISCUSSION.js.map +0 -1
package/lib/helpers/index.d.ts
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @project @beblurt/blurt-nodes-checker
|
|
3
|
+
* @file Type definition
|
|
4
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
1
21
|
/** TYPE */
|
|
2
|
-
import {
|
|
3
|
-
import { DYNAMIC_GLOBAL_PROPERTIES } from "./CONDENSER_API/DYNAMIC_GLOBAL_PROPERTIES.js";
|
|
4
|
-
import { GET_ACCOUNT } from "./CONDENSER_API/GET_ACCOUNT.js";
|
|
5
|
-
import { GET_BLOG_ENTRY } from "./CONDENSER_API/GET_BLOG_ENTRY.js";
|
|
6
|
-
import { GET_CONFIG } from "./CONDENSER_API/GET_CONFIG.js";
|
|
7
|
-
import { GET_CONTENT } from "./CONDENSER_API/GET_CONTENT.js";
|
|
8
|
-
import { GET_DISCUSSION } from "./CONDENSER_API/GET_DISCUSSION.js";
|
|
22
|
+
import { BlogEntry, Discussion, DynamicGlobalProperties, ExtendedAccount, NexusAccountNotifications, NexusPayoutStats, NexusPost, NexusProfile, NexusCommunity, Post, RpcNodeConfig, SignedBlock } from "@beblurt/dblurt";
|
|
9
23
|
export declare type OPTIONS = {
|
|
24
|
+
debug?: boolean;
|
|
10
25
|
full?: boolean;
|
|
26
|
+
nexus?: boolean;
|
|
11
27
|
timeout?: number;
|
|
12
28
|
interval?: number;
|
|
13
29
|
reset?: number;
|
|
14
30
|
};
|
|
15
|
-
export declare type JSONRPC = {
|
|
16
|
-
jsonrpc: string;
|
|
17
|
-
id: number | string;
|
|
18
|
-
result?: GET_CONFIG | BLOCK_GET_BLOCK | DYNAMIC_GLOBAL_PROPERTIES | Array<GET_ACCOUNT> | Array<GET_BLOG_ENTRY> | GET_CONTENT | Array<GET_DISCUSSION>;
|
|
19
|
-
error?: {
|
|
20
|
-
code: number;
|
|
21
|
-
message: string;
|
|
22
|
-
data?: unknown;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
31
|
export declare type TEST_RPC_NODE = {
|
|
26
32
|
name: string;
|
|
27
33
|
description: string;
|
|
@@ -44,11 +50,13 @@ export declare type RPC_NODE = {
|
|
|
44
50
|
version?: string;
|
|
45
51
|
deactivated?: boolean;
|
|
46
52
|
test_result: Array<TEST_RPC_NODE>;
|
|
53
|
+
nexus?: boolean;
|
|
47
54
|
};
|
|
48
55
|
export declare type FULL_TEST = {
|
|
49
56
|
name: string;
|
|
50
57
|
description: string;
|
|
51
|
-
|
|
58
|
+
nexus: boolean;
|
|
59
|
+
method: "bridge.account_notifications" | "bridge.get_payout_stats" | "bridge.get_post" | "bridge.get_profile" | "bridge.list_communities" | "condenser_api.get_accounts" | "condenser_api.get_block" | "condenser_api.get_blog_entries" | "condenser_api.get_content" | "condenser_api.get_dynamic_global_properties" | "condenser_api.get_discussions_by_blog";
|
|
52
60
|
params: unknown;
|
|
53
|
-
validator: (result:
|
|
61
|
+
validator: (result: RpcNodeConfig | Array<NexusAccountNotifications> | NexusPayoutStats | NexusPost | NexusProfile | Array<NexusCommunity> | Array<ExtendedAccount> | SignedBlock | Array<BlogEntry> | Post | DynamicGlobalProperties | Array<Discussion>) => boolean;
|
|
54
62
|
};
|
package/lib/helpers/index.js
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @project @beblurt/blurt-nodes-checker
|
|
3
|
+
* @file Type definition
|
|
4
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
1
21
|
export {};
|
|
2
22
|
//# sourceMappingURL=index.js.map
|
package/lib/helpers/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @project @beblurt/blurt-nodes-checker
|
|
3
|
-
* @
|
|
3
|
+
* @file Blurt Nodes Checker
|
|
4
|
+
* @description Testing the different RPC nodes of the Blurt blockchain
|
|
5
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
4
6
|
* @license
|
|
5
7
|
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
6
8
|
*
|
|
@@ -17,8 +19,6 @@
|
|
|
17
19
|
* You should have received a copy of the GNU General Public License
|
|
18
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
21
|
*/
|
|
20
|
-
/** Axios */
|
|
21
|
-
import axios from "axios";
|
|
22
22
|
/** RxJS */
|
|
23
23
|
import { Subject } from "rxjs";
|
|
24
24
|
import { OPTIONS, RPC_NODE, FULL_TEST } from "./helpers/index.js";
|
|
@@ -27,17 +27,18 @@ export declare class BlurtNodesChecker {
|
|
|
27
27
|
nodes: RPC_NODE[];
|
|
28
28
|
message: Subject<RPC_NODE[]>;
|
|
29
29
|
timer: ReturnType<typeof setTimeout>;
|
|
30
|
+
debug: boolean;
|
|
30
31
|
full: boolean;
|
|
32
|
+
nexus: boolean;
|
|
31
33
|
interval: number;
|
|
32
34
|
timeout: number;
|
|
33
35
|
reset?: number;
|
|
34
|
-
instance: axios.AxiosInstance;
|
|
35
|
-
intercept?: string;
|
|
36
36
|
tests: FULL_TEST[];
|
|
37
37
|
constructor(nodes: string[], options?: OPTIONS);
|
|
38
38
|
start(): Promise<void>;
|
|
39
39
|
stop(): void;
|
|
40
40
|
restart(): void;
|
|
41
|
+
private nexusLight;
|
|
41
42
|
private check;
|
|
42
43
|
private sendMessage;
|
|
43
44
|
}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @project @beblurt/blurt-nodes-checker
|
|
3
|
-
* @
|
|
3
|
+
* @file Blurt Nodes Checker
|
|
4
|
+
* @description Testing the different RPC nodes of the Blurt blockchain
|
|
5
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
4
6
|
* @license
|
|
5
7
|
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
6
8
|
*
|
|
@@ -17,14 +19,12 @@
|
|
|
17
19
|
* You should have received a copy of the GNU General Public License
|
|
18
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
21
|
*/
|
|
20
|
-
/** Axios */
|
|
21
|
-
import axios from "axios";
|
|
22
22
|
/** RxJS */
|
|
23
23
|
import { Subject } from "rxjs";
|
|
24
|
-
/** Process hrtime for browser (node + fallback) */
|
|
25
|
-
import { hrtime } from "./hrtime.js";
|
|
26
24
|
/** Test list to proceed */
|
|
27
25
|
import { testList } from "./test.js";
|
|
26
|
+
/** TYPE */
|
|
27
|
+
import { Client } from '@beblurt/dblurt';
|
|
28
28
|
const RegExpUrl = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,=.]+$/;
|
|
29
29
|
export class BlurtNodesChecker {
|
|
30
30
|
constructor(nodes, options) {
|
|
@@ -46,37 +46,37 @@ export class BlurtNodesChecker {
|
|
|
46
46
|
writable: true,
|
|
47
47
|
value: void 0
|
|
48
48
|
});
|
|
49
|
-
Object.defineProperty(this, "
|
|
49
|
+
Object.defineProperty(this, "debug", {
|
|
50
50
|
enumerable: true,
|
|
51
51
|
configurable: true,
|
|
52
52
|
writable: true,
|
|
53
53
|
value: false
|
|
54
54
|
});
|
|
55
|
-
Object.defineProperty(this, "
|
|
55
|
+
Object.defineProperty(this, "full", {
|
|
56
56
|
enumerable: true,
|
|
57
57
|
configurable: true,
|
|
58
58
|
writable: true,
|
|
59
|
-
value:
|
|
59
|
+
value: false
|
|
60
60
|
});
|
|
61
|
-
Object.defineProperty(this, "
|
|
61
|
+
Object.defineProperty(this, "nexus", {
|
|
62
62
|
enumerable: true,
|
|
63
63
|
configurable: true,
|
|
64
64
|
writable: true,
|
|
65
|
-
value:
|
|
65
|
+
value: false
|
|
66
66
|
});
|
|
67
|
-
Object.defineProperty(this, "
|
|
67
|
+
Object.defineProperty(this, "interval", {
|
|
68
68
|
enumerable: true,
|
|
69
69
|
configurable: true,
|
|
70
70
|
writable: true,
|
|
71
|
-
value:
|
|
71
|
+
value: 900000
|
|
72
72
|
});
|
|
73
|
-
Object.defineProperty(this, "
|
|
73
|
+
Object.defineProperty(this, "timeout", {
|
|
74
74
|
enumerable: true,
|
|
75
75
|
configurable: true,
|
|
76
76
|
writable: true,
|
|
77
|
-
value:
|
|
77
|
+
value: 3000
|
|
78
78
|
});
|
|
79
|
-
Object.defineProperty(this, "
|
|
79
|
+
Object.defineProperty(this, "reset", {
|
|
80
80
|
enumerable: true,
|
|
81
81
|
configurable: true,
|
|
82
82
|
writable: true,
|
|
@@ -89,8 +89,12 @@ export class BlurtNodesChecker {
|
|
|
89
89
|
value: testList(20000000, "blurtofficial", "blurt-hardfork-0-8-a-new-consensus")
|
|
90
90
|
});
|
|
91
91
|
if (options) {
|
|
92
|
+
if (options.debug && (typeof options.debug) === 'boolean')
|
|
93
|
+
this.debug = options.debug;
|
|
92
94
|
if (options.full && (typeof options.full) === 'boolean')
|
|
93
95
|
this.full = options.full;
|
|
96
|
+
if (options.nexus && (typeof options.nexus) === 'boolean')
|
|
97
|
+
this.nexus = options.nexus;
|
|
94
98
|
if (options.interval && typeof options.interval === 'number')
|
|
95
99
|
this.interval = options.interval * 1000;
|
|
96
100
|
if (options.timeout && typeof options.timeout === 'number')
|
|
@@ -118,13 +122,6 @@ export class BlurtNodesChecker {
|
|
|
118
122
|
}
|
|
119
123
|
async start() {
|
|
120
124
|
try {
|
|
121
|
-
this.instance.interceptors.request.use((config) => {
|
|
122
|
-
if (config && config.headers && config.headers["starttime"])
|
|
123
|
-
delete config.headers["starttime"];
|
|
124
|
-
return config;
|
|
125
|
-
}, (error) => {
|
|
126
|
-
return Promise.reject(error);
|
|
127
|
-
});
|
|
128
125
|
if (this.nodes.length > 0) {
|
|
129
126
|
setTimeout(() => {
|
|
130
127
|
this.check();
|
|
@@ -146,88 +143,94 @@ export class BlurtNodesChecker {
|
|
|
146
143
|
clearInterval(this.timer);
|
|
147
144
|
this.start();
|
|
148
145
|
}
|
|
149
|
-
async
|
|
146
|
+
async nexusLight(node) {
|
|
147
|
+
return new Promise((resolve) => {
|
|
148
|
+
const client = new Client(node.url, { timeout: this.timeout });
|
|
149
|
+
client.nexus.accountNotifications("blurtofficial").then(notifs => {
|
|
150
|
+
if (notifs) {
|
|
151
|
+
resolve(true);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
resolve(false);
|
|
155
|
+
}
|
|
156
|
+
}).catch(e => {
|
|
157
|
+
if (this.debug) {
|
|
158
|
+
console.warn('[BNC] Nexus Light: ', e instanceof Error ? e.message : 'Unknown error!');
|
|
159
|
+
}
|
|
160
|
+
resolve(false);
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
check() {
|
|
150
165
|
/** Define the execution time (used for sendMessage) */
|
|
151
166
|
const checkTime = Date.now();
|
|
152
167
|
/** Node Loop */
|
|
153
168
|
for (const [i, node] of this.nodes.entries()) {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
169
|
+
/** We reach the reset number of tests => reinit counters value */
|
|
170
|
+
if (this.reset && (node.nb_ok + node.nb_error + node.nb_degraded) === this.reset) {
|
|
171
|
+
this.nodes[i].nb_ok = 0;
|
|
172
|
+
this.nodes[i].nb_error = 0;
|
|
173
|
+
this.nodes[i].nb_degraded = 0;
|
|
174
|
+
if (this.debug) {
|
|
175
|
+
console.log('[BNC] reset counter', node.url);
|
|
160
176
|
}
|
|
177
|
+
}
|
|
178
|
+
/** hrtime */
|
|
179
|
+
const startRequestNode = Date.now();
|
|
180
|
+
/** First request to BLURT node (light test) */
|
|
181
|
+
const client = new Client(node.url, { timeout: this.timeout });
|
|
182
|
+
client.condenser.getConfig().then(async (config) => {
|
|
161
183
|
/** hrtime */
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
const tIndex = node.test_result.findIndex(t => t.method === test.method);
|
|
198
|
-
/** Execute the test */
|
|
199
|
-
const options = {
|
|
200
|
-
method: "post",
|
|
201
|
-
url: node.url,
|
|
202
|
-
headers: {
|
|
203
|
-
"Content-Type": "application/json"
|
|
204
|
-
},
|
|
205
|
-
data: {
|
|
206
|
-
jsonrpc: "2.0",
|
|
207
|
-
method: test.method,
|
|
208
|
-
params: test.params,
|
|
209
|
-
id: 1
|
|
210
|
-
},
|
|
211
|
-
timeout: this.timeout
|
|
212
|
-
};
|
|
213
|
-
this.instance(options).then(get_config => {
|
|
184
|
+
const milli = Date.now() - startRequestNode;
|
|
185
|
+
this.nodes[i].nb_ok++;
|
|
186
|
+
this.nodes[i].status = "online";
|
|
187
|
+
this.nodes[i].version = config.BLURT_BLOCKCHAIN_VERSION;
|
|
188
|
+
this.nodes[i].duration = milli;
|
|
189
|
+
if (this.debug) {
|
|
190
|
+
console.log('[BNC]', node.url, 'updated');
|
|
191
|
+
}
|
|
192
|
+
/** try Nexus if asked (light test) */
|
|
193
|
+
if (this.nexus) {
|
|
194
|
+
node.nexus = await this.nexusLight(node);
|
|
195
|
+
this.nodes[i].nexus = node.nexus;
|
|
196
|
+
if (this.debug) {
|
|
197
|
+
console.log('[BNC]', node.url, 'Nexus =>', node.nexus);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/** Execute a full test */
|
|
201
|
+
if (this.full) {
|
|
202
|
+
/** Define the number of test to proceed */
|
|
203
|
+
const doNexus = this.nexus && node.nexus ? true : false;
|
|
204
|
+
const doNbTests = doNexus ? this.tests.length : this.tests.filter(t => !t.nexus).length;
|
|
205
|
+
if (this.debug) {
|
|
206
|
+
console.log('[BNC]', node.url, 'Nb Tests to proceed =', doNbTests, 'Proceed Nexus =>', doNexus);
|
|
207
|
+
}
|
|
208
|
+
/** Test Loop */
|
|
209
|
+
for (const test of this.tests) {
|
|
210
|
+
if (doNexus || !test.nexus) {
|
|
211
|
+
/** hrtime */
|
|
212
|
+
const startRequestTest = Date.now();
|
|
213
|
+
/** Check if previous test */
|
|
214
|
+
const tIndex = node.test_result.findIndex(t => t.method === test.method);
|
|
215
|
+
/** Execute the test */
|
|
216
|
+
const method = test.method.split('.');
|
|
217
|
+
if (method[0] && method[1]) {
|
|
218
|
+
client.call(method[0], method[1], test.params).then(result => {
|
|
214
219
|
/** hrtime */
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
const config = get_config.data ? get_config.data : null;
|
|
218
|
-
const success = config && config.result && test.validator ? test.validator(config.result) : false;
|
|
220
|
+
const milli = Date.now() - startRequestTest;
|
|
221
|
+
const success = result && test.validator ? test.validator(result) : false;
|
|
219
222
|
/** Result of the test */
|
|
220
223
|
const r = {
|
|
221
224
|
name: test.name,
|
|
222
225
|
description: test.description,
|
|
223
226
|
method: test.method,
|
|
224
227
|
success: success,
|
|
225
|
-
duration:
|
|
228
|
+
duration: milli,
|
|
226
229
|
last_check: checkTime
|
|
227
230
|
};
|
|
228
231
|
/** If test validation failed */
|
|
229
232
|
if (!success) {
|
|
230
|
-
r.error =
|
|
233
|
+
r.error = "validation failed!";
|
|
231
234
|
/** update status of node */
|
|
232
235
|
this.nodes[i].status = "degraded";
|
|
233
236
|
/** update degraded counter */
|
|
@@ -254,8 +257,11 @@ export class BlurtNodesChecker {
|
|
|
254
257
|
this.nodes[i].test_result.push(r);
|
|
255
258
|
}
|
|
256
259
|
/** End of tests for the node? */
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
260
|
+
const nbTests = this.nodes[i].test_result.filter(n => n.last_check === checkTime).length;
|
|
261
|
+
if (this.debug && nbTests === doNbTests) {
|
|
262
|
+
console.log('[BNC]', node.url, 'Proceed test =>', nbTests, '/', doNbTests);
|
|
263
|
+
}
|
|
264
|
+
if (nbTests === doNbTests) {
|
|
259
265
|
/** assign the execution time */
|
|
260
266
|
this.nodes[i].last_check = checkTime;
|
|
261
267
|
/** Send message? */
|
|
@@ -288,8 +294,11 @@ export class BlurtNodesChecker {
|
|
|
288
294
|
/** Update average time */
|
|
289
295
|
delete this.nodes[i].average_time;
|
|
290
296
|
/** End of tests for the node? */
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
297
|
+
const nbTests = this.nodes[i].test_result.filter(n => n.last_check === checkTime).length;
|
|
298
|
+
if (this.debug) {
|
|
299
|
+
console.log('[BNC]', node.url, 'ERROR Proceed test =>', nbTests, '/', doNbTests);
|
|
300
|
+
}
|
|
301
|
+
if (nbTests === doNbTests) {
|
|
293
302
|
/** assign the execution time */
|
|
294
303
|
this.nodes[i].last_check = checkTime;
|
|
295
304
|
/** Send message? */
|
|
@@ -298,38 +307,32 @@ export class BlurtNodesChecker {
|
|
|
298
307
|
});
|
|
299
308
|
}
|
|
300
309
|
}
|
|
301
|
-
else {
|
|
302
|
-
/** assign the execution time */
|
|
303
|
-
this.nodes[i].last_check = checkTime;
|
|
304
|
-
/** Send message? */
|
|
305
|
-
this.sendMessage(checkTime);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
else {
|
|
309
|
-
this.nodes[i].nb_error++;
|
|
310
|
-
this.nodes[i].status = "error";
|
|
311
|
-
this.nodes[i].error = "No result!";
|
|
312
|
-
/** assign the execution time */
|
|
313
|
-
this.nodes[i].last_check = checkTime;
|
|
314
|
-
/** Send message? */
|
|
315
|
-
this.sendMessage(checkTime);
|
|
316
310
|
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
this.nodes[i].status = "error";
|
|
320
|
-
if (error)
|
|
321
|
-
this.nodes[i].error = error.message;
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
322
313
|
/** assign the execution time */
|
|
323
314
|
this.nodes[i].last_check = checkTime;
|
|
324
315
|
/** Send message? */
|
|
325
316
|
this.sendMessage(checkTime);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
317
|
+
}
|
|
318
|
+
}).catch(error => {
|
|
319
|
+
this.nodes[i].nb_error++;
|
|
320
|
+
this.nodes[i].status = "error";
|
|
321
|
+
if (error)
|
|
322
|
+
this.nodes[i].error = error.message;
|
|
323
|
+
/** assign the execution time */
|
|
324
|
+
this.nodes[i].last_check = checkTime;
|
|
325
|
+
/** Send message? */
|
|
326
|
+
this.sendMessage(checkTime);
|
|
327
|
+
});
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
async sendMessage(checkTime) {
|
|
331
331
|
/** Send message? */
|
|
332
332
|
const nbNodeChecked = this.nodes.filter(n => n.last_check === checkTime);
|
|
333
|
+
if (this.debug) {
|
|
334
|
+
console.log('[BNC]', `nbNodeChecked = ${nbNodeChecked.length}`);
|
|
335
|
+
}
|
|
333
336
|
if (this.nodes.length === nbNodeChecked.length)
|
|
334
337
|
this.message.next(this.nodes);
|
|
335
338
|
}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,WAAW;AACX,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,2BAA2B;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,WAAW;AACX,O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KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAA;QACxE,IAAG,IAAI,CAAC,KAAK,EAAE;YAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,mBAAmB,aAAa,CAAC,MAAM,EAAE,CAAC,CAAA;SAAE;QAElF,IAAG,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,aAAa,CAAC,MAAM;YAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC9E,CAAC;CACF"}
|
package/lib/test.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @project @beblurt/blurt-nodes-checker
|
|
3
|
-
* @
|
|
3
|
+
* @file Full tests
|
|
4
|
+
* @description Testing the different RPC nodes of the Blurt blockchain
|
|
5
|
+
* @author BeBlurt <https://beblurt.com/@beblurt>
|
|
4
6
|
* @license
|
|
5
7
|
* Copyright (C) 2022 IMT ASE Co., LTD
|
|
6
8
|
*
|