Skip to content

Commit

Permalink
fix: network generate with networkInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
kidneyweakx committed Feb 19, 2024
1 parent b0f47ac commit f0829c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/quorum/service/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default class Network extends AbstractService {

public generate (networkGenerateConfig: NetworkGenerateType) {
const staticNodesJson: string[] = []

const networkInfo: NetworkInfoItem[] = []
// Add node to static-nodes.json
for (let i = 0; i < networkGenerateConfig.validatorNumber; i += 1) {
const { publicKey } = this.createKey(`artifacts/validator${i}`)
Expand All @@ -242,12 +242,15 @@ export default class Network extends AbstractService {
this.bdkFile.copyPrivateKeyToValidator(i)
this.bdkFile.copyPublicKeyToValidator(i)
this.bdkFile.copyAddressToValidator(i)
this.createNetworkInfoJson(networkInfo, `http://validator${i}:${8545 + i * 2}`)
}
for (let i = 0; i < networkGenerateConfig.memberNumber; i += 1) {
this.bdkFile.copyPrivateKeyToMember(i)
this.bdkFile.copyPublicKeyToMember(i)
this.bdkFile.copyAddressToMember(i)
this.createNetworkInfoJson(networkInfo, `http://member${i}:${8645 + i * 2}`)
}
this.bdkFile.createNetworkInfoJson(networkInfo)
}

public async addValidatorLocal () {
Expand Down

0 comments on commit f0829c2

Please sign in to comment.