Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually add transaction to Mempool #368

Merged
merged 1 commit into from
Oct 20, 2021
Merged

Manually add transaction to Mempool #368

merged 1 commit into from
Oct 20, 2021

Conversation

brunoffranca
Copy link
Contributor

@brunoffranca brunoffranca commented Oct 19, 2021

Pull request checklist

  • All tests pass. Demo project builds and runs.
  • I have resolved any merge conflicts.

What's in this pull request?

  1. Separated the transaction verification logic into its own function and simplified it.
  2. Added a method to the Mempool to add a transaction manually.

@brunoffranca brunoffranca self-assigned this Oct 19, 2021
@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #368 (0994256) into albatross (0c0b387) will increase coverage by 0.62%.
The diff coverage is 22.22%.

❗ Current head 0994256 differs from pull request most recent head bb2b2b0. Consider uploading reports for the commit bb2b2b0 to get more accurate results
Impacted file tree graph

@@              Coverage Diff              @@
##           albatross     #368      +/-   ##
=============================================
+ Coverage      29.81%   30.43%   +0.62%     
=============================================
  Files            346      347       +1     
  Lines          32930    32923       -7     
  Branches       15263    15267       +4     
=============================================
+ Hits            9818    10021     +203     
+ Misses         14268    14101     -167     
+ Partials        8844     8801      -43     
Flag Coverage Δ
unittests 30.43% <22.22%> (+0.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mempool/src/executor.rs 0.00% <0.00%> (ø)
mempool/src/lib.rs 100.00% <ø> (ø)
mempool/src/mempool.rs 30.85% <0.00%> (+1.40%) ⬆️
primitives/transaction/src/lib.rs 45.75% <ø> (ø)
mempool/src/verify.rs 27.58% <27.58%> (ø)
database/src/volatile.rs 39.27% <0.00%> (-0.34%) ⬇️
primitives/block/src/block.rs 41.06% <0.00%> (ø)
utils/src/merkle/mod.rs 42.03% <0.00%> (+0.33%) ⬆️
beserial/src/lib.rs 48.85% <0.00%> (+0.38%) ⬆️
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0c0b387...bb2b2b0. Read the comment docs.

Copy link
Member

@jsdanielh jsdanielh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Only few minor comments

mempool/src/executor.rs Outdated Show resolved Hide resolved
mempool/src/mempool.rs Outdated Show resolved Hide resolved
mempool/src/verify.rs Outdated Show resolved Hide resolved
mempool/src/verify.rs Outdated Show resolved Hide resolved
mempool/src/verify.rs Outdated Show resolved Hide resolved
… and simplified it.

2. Added a method to the Mempool to add a transaction manually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants