File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export const PORT = 10361;
7
7
export const TESTING_CID = "QmXjYBY478Cno4jzdCcPy4NcJYFrwHZ51xaCP8vUwN9MGm" ;
8
8
9
9
// Node and network info
10
+ export const NETWORK_LEVEL = 1 ;
10
11
export const NODE_ID = ( await readFile ( NODE_ID_FILE_PATH , "utf8" ) ) . trim ( ) ;
11
12
export const NETWORK = process . env . NETWORK ?. trim ( ) . toLowerCase ( ) || "local" ;
12
13
export const VERSION = pVersion ( process . env . VERSION || DEV_VERSION ) ;
Original file line number Diff line number Diff line change @@ -5,11 +5,12 @@ import fetch from "node-fetch";
5
5
import {
6
6
DEV_VERSION ,
7
7
FIL_WALLET_ADDRESS ,
8
- NODE_VERSION_HASH ,
9
8
NETWORK ,
9
+ NETWORK_LEVEL ,
10
10
NODE_ID ,
11
11
NODE_OPERATOR_EMAIL ,
12
12
NODE_UA ,
13
+ NODE_VERSION_HASH ,
13
14
ORCHESTRATOR_REGISTRATION ,
14
15
ORCHESTRATOR_URL ,
15
16
updateNodeToken ,
@@ -48,7 +49,9 @@ export async function register(initial = false) {
48
49
49
50
let preregisterResponse ;
50
51
if ( initial ) {
51
- preregisterResponse = await sendPreRegisterRequest ( postOptions ( { nodeId : NODE_ID } ) ) ;
52
+ preregisterResponse = await sendPreRegisterRequest (
53
+ postOptions ( { nodeId : NODE_ID , level : NETWORK_LEVEL , version : VERSION } )
54
+ ) ;
52
55
}
53
56
54
57
if ( preregisterResponse ?. filesToPurge ) {
@@ -75,7 +78,7 @@ export async function register(initial = false) {
75
78
const body = {
76
79
nodeId : NODE_ID ,
77
80
nodeVersionHash : NODE_VERSION_HASH ,
78
- level : 1 ,
81
+ level : NETWORK_LEVEL ,
79
82
version : VERSION ,
80
83
filWalletAddress : FIL_WALLET_ADDRESS ,
81
84
operatorEmail : NODE_OPERATOR_EMAIL ,
You can’t perform that action at this time.
0 commit comments