diff --git a/ironfish/src/fileStores/config.ts b/ironfish/src/fileStores/config.ts index 9389ce510b..daf11e8fa0 100644 --- a/ironfish/src/fileStores/config.ts +++ b/ironfish/src/fileStores/config.ts @@ -110,6 +110,11 @@ export type ConfigOptions = { * mempool. */ defaultTransactionExpirationSequenceDelta: number + + /** + * The default number of blocks to request per message when syncing. + */ + blocksPerMessage: number } export const ConfigOptionsSchema: yup.ObjectSchema> = yup @@ -172,6 +177,7 @@ export class Config extends KeyStore { telemetryApi: DEFAULT_TELEMETRY_API, accountName: DEFAULT_WALLET_NAME, generateNewIdentity: false, + blocksPerMessage: 20, } } } diff --git a/ironfish/src/node.ts b/ironfish/src/node.ts index 01b12a3de2..9dfbccf8c7 100644 --- a/ironfish/src/node.ts +++ b/ironfish/src/node.ts @@ -112,6 +112,7 @@ export class IronfishNode { logger: logger, peerNetwork: this.peerNetwork, strategy: this.strategy, + blocksPerMessage: config.get('blocksPerMessage'), }) this.config.onConfigChange.on((key, value) => this.onConfigChange(key, value))