File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
container-manager/src/gen Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -214,8 +214,8 @@ function initConfig(config) {
214214
215215 if ( config . xdpos . foundation_pk !== "" ) {
216216 try {
217- [ config . xdpos . foundation_addr , config . keys . foundation_pk ] = validatePK (
218- config . keys . foundation_pk
217+ [ config . xdpos . foundation_addr , config . xdpos . foundation_pk ] = validatePK (
218+ config . xdpos . foundation_pk
219219 ) ;
220220 } catch {
221221 console . log ( "Invalid FOUNDATION_PK" ) ;
@@ -399,7 +399,12 @@ function genXdposKeys() {
399399 "0x" : config . keys . grandmaster_addr ,
400400 short : config . keys . grandmaster_addr . replace ( / ^ 0 x / i, "" ) ,
401401 } ;
402- if ( Object . keys ( keys ) . length !== config . num_subnet + 1 ) {
402+ keys [ "Foundation" ] = {
403+ PrivateKey : config . xdpos . foundation_pk ,
404+ "0x" : config . xdpos . foundation_addr ,
405+ short : config . xdpos . foundation_addr . replace ( / ^ 0 x / i, "" ) ,
406+ } ;
407+ if ( Object . keys ( keys ) . length !== config . num_subnet + 2 ) {
403408 // sanity check
404409 console . log ( "bad case, key length not equal number of subnets" ) ;
405410 console . log ( Object . keys ( keys ) . length , config . num_subnet + 1 ) ;
You can’t perform that action at this time.
0 commit comments