From fbdf45c01d5d7b2ef98e1ab09a5f6b3687d518ac Mon Sep 17 00:00:00 2001 From: David Murdoch Date: Thu, 24 Sep 2020 18:00:06 -0400 Subject: [PATCH] make private and readonly things private and readonly --- src/chains/ethereum/src/components/transaction-pool.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/chains/ethereum/src/components/transaction-pool.ts b/src/chains/ethereum/src/components/transaction-pool.ts index 800d25c53d..ec19d565ea 100644 --- a/src/chains/ethereum/src/components/transaction-pool.ts +++ b/src/chains/ethereum/src/components/transaction-pool.ts @@ -18,7 +18,7 @@ export default class TransactionPool extends Emittery.Typed<{}, "drain"> { /** * Minimum price bump percentage to replace an already existing transaction (nonce) */ - public priceBump: bigint = 10n; + #priceBump: bigint = 10n; #blockchain: Blockchain; constructor(options: EthereumInternalOptions["miner"], blockchain: Blockchain) { @@ -26,9 +26,9 @@ export default class TransactionPool extends Emittery.Typed<{}, "drain"> { this.#blockchain = blockchain; this.#options = options; } - public executables: Map> = new Map(); - #origins: Map> = new Map(); - #accountPromises = new Map>(); + public readonly executables: Map> = new Map(); + readonly #origins: Map> = new Map(); + readonly #accountPromises = new Map>(); /** * Inserts a transaction into the pending queue, if executable, or future pool @@ -77,7 +77,7 @@ export default class TransactionPool extends Emittery.Typed<{}, "drain"> { // executables queue already. Replace the matching transaction or throw this // new transaction away as neccessary. const pendingArray = executableOriginTransactions.array; - const priceBump = this.priceBump; + const priceBump = this.#priceBump; const newGasPrice = Quantity.from(transaction.gasPrice).toBigInt(); // Notice: we're iterating over the raw heap array, which isn't // neccessarily sorted