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

chore(txpool): pooled tx constructor #3980

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

rkrasiuk
Copy link
Member

Motivation

Move PooledTransaction initialization logic to its own constructor with pub visibility.

@rkrasiuk rkrasiuk added the A-tx-pool Related to the transaction mempool label Jul 28, 2023
@rkrasiuk rkrasiuk requested a review from mattsse as a code owner July 28, 2023 11:42
Transaction::Eip2930(t) => U256::from(t.gas_price) * U256::from(t.gas_limit),
Transaction::Eip1559(t) => U256::from(t.max_fee_per_gas) * U256::from(t.gas_limit),
};
let cost = gas_cost + U256::from(transaction.value());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will we continue to need this?

Copy link
Member Author

Choose a reason for hiding this comment

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

the cost is hot loaded in pool update fn. don't mind leaving this

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #3980 (49c8da9) into main (d2cdd10) will decrease coverage by 0.23%.
Report is 4 commits behind head on main.
The diff coverage is 0.00%.

Impacted file tree graph

Files Changed Coverage Δ
crates/transaction-pool/src/traits.rs 3.94% <0.00%> (-0.08%) ⬇️

... and 18 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.33% <0.00%> (-0.06%) ⬇️
unit-tests 64.22% <0.00%> (-0.22%) ⬇️

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

Components Coverage Δ
reth binary 26.21% <ø> (-0.95%) ⬇️
blockchain tree 83.04% <ø> (ø)
pipeline 89.82% <ø> (ø)
storage (db) 74.30% <ø> (ø)
trie 94.70% <ø> (ø)
txpool 45.54% <0.00%> (-0.04%) ⬇️
networking 77.60% <ø> (-0.05%) ⬇️
rpc 58.51% <ø> (+0.06%) ⬆️
consensus 64.46% <ø> (ø)
revm 33.08% <ø> (-0.61%) ⬇️
payload builder 6.61% <ø> (ø)
primitives 87.80% <ø> (-0.03%) ⬇️

@rkrasiuk rkrasiuk added this pull request to the merge queue Jul 28, 2023
Merged via the queue into main with commit d8677b4 Jul 28, 2023
@rkrasiuk rkrasiuk deleted the rkrasiuk/chore-pooled-transaction branch July 28, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tx-pool Related to the transaction mempool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants