Skip to content

Commit 01c60c1

Browse files
committed
feat: refactor attemptBundle method for clearer logging and improved condition checks on mempool size before bundling operations
1 parent d9a9326 commit 01c60c1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/bundler/src/modules/ExecutionManager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,11 @@ export class ExecutionManager {
8383
* @param force
8484
*/
8585
async attemptBundle (force = true): Promise<SendBundleReturn | undefined> {
86-
if (force || this.mempoolManager.count() >= this.maxMempoolSize) {
86+
const hasOps = this.mempoolManager.count() >= this.maxMempoolSize
87+
if (hasOps) {
8788
debug('attemptBundle force=', force, 'count=', this.mempoolManager.count(), 'max=', this.maxMempoolSize)
89+
}
90+
if (force || hasOps) {
8891
const ret = await this.bundleManager.sendNextBundle()
8992
if (this.maxMempoolSize === 0) {
9093
// in "auto-bundling" mode (which implies auto-mining) also flush mempool from included UserOps

0 commit comments

Comments
 (0)