flashbots / builder

Flashbots MEV-Boost Block Builder

Home Page:https://docs.flashbots.net/flashbots-mev-boost/block-builders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mismatch algorithm type in test code

boosik opened this issue · comments

commented

Hi, I am boosik in a41, a korean blockchain infrastructure firm.
I found that the conditional branch of the code is wrong.

switch algo {
case ALGO_GREEDY_BUCKETS:
builder := newGreedyBuilder(chData.chain, chData.chainConfig, nil, env, nil, nil)
result, _, _ = builder.buildBlock([]types.SimulatedBundle{}, nil, txs)
case ALGO_GREEDY:
builder := newGreedyBucketsBuilder(chData.chain, chData.chainConfig, nil, nil, env, nil, nil)
result, _, _ = builder.buildBlock([]types.SimulatedBundle{}, nil, txs)
}

to

switch algo {
    case ALGO_GREEDY_BUCKETS:
        builder := newGreedyBucketsBuilder(chData.chain, chData.chainConfig, nil, nil, env, nil, nil)
        result, _, _ = builder.buildBlock([]types.SimulatedBundle{}, nil, txs)
    case ALGO_GREEDY:
        builder := newGreedyBuilder(chData.chain, chData.chainConfig, nil, env, nil, nil)
        result, _, _ = builder.buildBlock([]types.SimulatedBundle{}, nil, txs)
}

If it is right, I will make PR with my forked repository. thank you!