Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Oct 21, 2024
1 parent 113a542 commit 56f8a7d
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/handlers/gasPriceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export class GasPriceManager {
private baseFeePerGasQueue: TimedQueue
private maxFeePerGasQueue: TimedQueue
private maxPriorityFeePerGasQueue: TimedQueue
private logger: Logger

public arbitrumManager: ArbitrumManager
public mantleManager: MantleManager
private maxQueueSize: number
private logger: Logger

constructor(config: AltoConfig) {
this.config = config
Expand All @@ -57,19 +57,13 @@ export class GasPriceManager {
level: config.publicClientLogLevel || config.logLevel
}
)
this.maxQueueSize = this.config.gasPriceExpiry
const maxQueueSize = this.config.gasPriceExpiry

const queueValidity = 1000 // milliseconds
this.baseFeePerGasQueue = new TimedQueue(
this.maxQueueSize,
queueValidity
)
this.maxFeePerGasQueue = new TimedQueue(
this.maxQueueSize,
queueValidity
)
this.baseFeePerGasQueue = new TimedQueue(maxQueueSize, queueValidity)
this.maxFeePerGasQueue = new TimedQueue(maxQueueSize, queueValidity)
this.maxPriorityFeePerGasQueue = new TimedQueue(
this.maxQueueSize,
maxQueueSize,
queueValidity
)

Expand All @@ -84,8 +78,8 @@ export class GasPriceManager {
}, this.config.gasPriceRefreshInterval * 1000)
}

this.arbitrumManager = new ArbitrumManager(this.maxQueueSize)
this.mantleManager = new MantleManager(this.maxQueueSize)
this.arbitrumManager = new ArbitrumManager(maxQueueSize)
this.mantleManager = new MantleManager(maxQueueSize)
}

public init() {
Expand Down

0 comments on commit 56f8a7d

Please sign in to comment.