alchemyplatform / rundler

An ERC-4337 Bundler in Rust
GNU Lesser General Public License v3.0
246 stars 29 forks source link

chore(builder): add unit tests to bundle_sender #735

Closed dancoombs closed 1 week ago

dancoombs commented 1 week ago

Create a unit testing framework for bundle_sender and write some tests.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 93.53846% with 42 lines in your changes missing coverage. Please review.

Project coverage is 57.15%. Comparing base (e94744a) to head (d5abafe).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/graphs/tree.svg?width=650&height=150&src=pr&token=FQKCPQJU2X&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform)](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | [Files](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | Coverage Δ | | |---|---|---| | [crates/builder/src/bundle\_proposer.rs](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735?src=pr&el=tree&filepath=crates%2Fbuilder%2Fsrc%2Fbundle_proposer.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform#diff-Y3JhdGVzL2J1aWxkZXIvc3JjL2J1bmRsZV9wcm9wb3Nlci5ycw==) | `90.37% <100.00%> (+4.16%)` | :arrow_up: | | [crates/builder/src/transaction\_tracker.rs](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735?src=pr&el=tree&filepath=crates%2Fbuilder%2Fsrc%2Ftransaction_tracker.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform#diff-Y3JhdGVzL2J1aWxkZXIvc3JjL3RyYW5zYWN0aW9uX3RyYWNrZXIucnM=) | `81.17% <100.00%> (+0.03%)` | :arrow_up: | | [crates/builder/src/bundle\_sender.rs](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735?src=pr&el=tree&filepath=crates%2Fbuilder%2Fsrc%2Fbundle_sender.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform#diff-Y3JhdGVzL2J1aWxkZXIvc3JjL2J1bmRsZV9zZW5kZXIucnM=) | `72.80% <92.30%> (+72.80%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | [Flag](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | Coverage Δ | | |---|---|---| | [unit-tests](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `57.15% <93.53%> (+2.72%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform#carryforward-flags-in-the-pull-request-comment) to find out more. | [Components](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | Coverage Δ | | |---|---|---| | [rundler binary](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `0.00% <ø> (ø)` | | | [builder](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `59.54% <93.53%> (+14.01%)` | :arrow_up: | | [dev](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `0.00% <ø> (ø)` | | | [pool](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `65.07% <ø> (ø)` | | | [provider](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `16.10% <ø> (ø)` | | | [rpc](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `25.66% <ø> (ø)` | | | [sim](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `78.13% <ø> (+0.26%)` | :arrow_up: | | [tasks](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `∅ <ø> (∅)` | | | [types](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `65.45% <ø> (ø)` | | | [utils](https://app.codecov.io/gh/alchemyplatform/rundler/pull/735/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=alchemyplatform) | `18.28% <ø> (ø)` | |