Skip to content

Commit 364d1d2

Browse files
committed
fix
1 parent e83cfdb commit 364d1d2

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

container-manager/src/gen/gen_xdpos.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff 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(/^0x/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(/^0x/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);

0 commit comments

Comments
 (0)