Skip to content

Commit

Permalink
fix: small fixes
Browse files Browse the repository at this point in the history
fix: added doc link
fix: updated bootstrap to 1.1.4 release
  • Loading branch information
fboucquez committed Feb 4, 2022
1 parent a0c3b59 commit 46f7e32
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 17 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ All notable changes to this project will be documented in this file.

The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.0.1] - NEXT
## [0.0.1] - Feb-4-2022

**Milestone**: Mainnet(1.0.3.1)

| Package | Version | Link |
| -------------- | ------- | -------------------------------------------------------------- |
| Symbol Network | v0.0.1 | [symbol-network](https://www.npmjs.com/package/symbol-network) |
| Package | Version | Link |
|------------------|---------|--------------------------------------------------------------------|
| Symbol Bootstrap | v1.1.4 | [symbol-bootstrap](https://www.npmjs.com/package/symbol-bootstrap) |
| Symbol Network | v0.0.1 | [symbol-bootstrap](https://www.npmjs.com/package/symbol-network) |

- Very first version of the tool!
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ To handle dozens or hundreds of Symbol Nodes in "cattle" style, where nodes are

If you are creating a Symbol node for the first time, please have look at the [symbol-bootstrap](https://github.com/fboucquez/symbol-bootstrap) cli.

For more information, checkout this [guide/blog post](https://dev.to/fboucquez/how-to-create-a-symbol-testnet-network-4hdd).

# Requirements

- Node 12.0.0+
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"lodash": "^4.17.21",
"remove": "^0.1.5",
"rxjs": "^7.5.2",
"symbol-bootstrap": "^1.1.4-alpha-7dcd80b",
"symbol-bootstrap": "^1.1.4",
"symbol-sdk": "^1.0.4-alpha-202112211435",
"tslib": "^2.3.1",
"winston": "^3.5.1"
Expand Down
2 changes: 1 addition & 1 deletion src/commands/generateNemesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ After running this command, your new network nemesis seed would be created. It a
logger.info('');
logger.info('Nemesis block has been generated. To verify the block using a demo box run:');
logger.info('');
logger.info(`$ symbol-bootstrap start -t ${nemesisTargetFolder} --noPassword --detached --healthCheck --report`);
logger.info(`$ symbol-bootstrap start -t ${nemesisTargetFolder} --noPassword --detached --healthCheck --report --pullImages`);
logger.info('');
logger.info(`Try the demo node by going to:`);
logger.info(' - Rest Accounts - http://localhost:3000/accounts');
Expand Down
2 changes: 1 addition & 1 deletion src/services/NetworkAccountResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class NetworkAccountResolver implements AccountResolver {
if (!nodeName) {
return this.promptAccount(networkType, account, keyName, nodeName, operationDescription, generateErrorMessage);
}
this.logger.info(`Loading ${keyName} Key for ${nodeName} of ${this.node.number}. Operation ${operationDescription}`);
this.logger.info(`Loading ${keyName} Key for ${nodeName} number ${this.node.number}. Operation ${operationDescription}`);
const storedAccount = await this.keyStore.getNodeAccount(networkType, keyName, nodeName, this.node, true);
if (!storedAccount) {
throw new Error(`${keyName} for node ${nodeName} does not exist!`);
Expand Down
2 changes: 1 addition & 1 deletion src/services/NetworkConfigurationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export class NetworkConfigurationService {
this.logger.info('');
this.logger.info(`The ${NetworkUtils.NETWORK_FILE} file has been updated!`);
this.logger.info('');
this.logger.info(`Nodes have been created/upgraded. `);
this.logger.info(`Nodes have been created/upgraded. You can deploy them!`);
this.logger.info('');
}

Expand Down
8 changes: 6 additions & 2 deletions src/utils/InitService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface InitServiceParams {

export class InitService {
constructor(private readonly logger: Logger, private readonly workingDir: string, private readonly params: InitServiceParams) {}

async execute(): Promise<void> {
const networkInputFile = NetworkUtils.NETWORK_INPUT_FILE;
const customNetworkPresetFile = NetworkUtils.NETWORK_PRESET_FILE;
Expand Down Expand Up @@ -391,10 +392,13 @@ export class InitService {
const nickName = await this.promptName(`Nodes's Nick Name`, 'The nick name of the these nodes', metadata.nickName);

const restProtocol = metadata.api ? await this.promptRestProtocol() : undefined;

const { confirmCreate } = await prompt([
{
default: true,
message: `Do you want to create ${total} nodes of type ${nodeTypeName} each with balance of ${balances.join(', ')}?`,
message: balances.find((b) => b > 0)
? `Do you want to create ${total} nodes of type ${nodeTypeName} each with balance of ${balances.join(', ')}?`
: `Do you want to create ${total} nodes of type ${nodeTypeName}?`,
type: 'confirm',
name: 'confirmCreate',
},
Expand Down Expand Up @@ -512,6 +516,7 @@ export class InitService {
public async generateRandomKey(fieldName: string, message: string, networkType: NetworkType): Promise<string> {
return this.promptText(fieldName, message, Account.generateNewAccount(networkType).privateKey, CommandUtils.isValidPrivateKey);
}

public async promptName(fieldName: string, message: string, defaultValue: string | undefined): Promise<string> {
return this.promptText(fieldName, message, defaultValue, this.isValidName);
}
Expand Down Expand Up @@ -563,7 +568,6 @@ export class InitService {
fieldName: string,
message: string,
defaultValue: string | undefined,

validate?: (input: any) => boolean | string | Promise<boolean | string>,
): Promise<string> {
return this.confirmedPrompt(
Expand Down

0 comments on commit 46f7e32

Please sign in to comment.