Skip to content

eth/handler: remove duplicate check for lists in body#2683

Merged
zzzckck merged 2 commits intobnb-chain:developfrom
buddh0:remove_duplicate_list_check
Sep 19, 2024
Merged

eth/handler: remove duplicate check for lists in body#2683
zzzckck merged 2 commits intobnb-chain:developfrom
buddh0:remove_duplicate_list_check

Conversation

@buddh0
Copy link
Copy Markdown
Contributor

@buddh0 buddh0 commented Sep 4, 2024

Description

eth/handler: remove duplicate check for lists in body

Rationale

in this PR(#2461),
check for 3 lists Uncles, Transactions, Withdrawals is added.

but indeed, most of them are useless, because
if block recieved by handleBlockBodies,
Uncles and Transactions have been checked at https://github.com/bnb-chain/bsc/blob/master/eth/fetcher/block_fetcher.go#L718
if block recieved by handleNewBlock
Uncles and Transactions have been checked at https://github.com/bnb-chain/bsc/blob/master/eth/protocols/eth/handlers.go#L316
so only add check for Withdrawals` is ok.

the check for Transactions cost not a little time when block is huge,
by removing the dupicate check, a better performance can be acheived

so this PR have 2 commits,
the first one is to revert the above PR,
the second one add the check for Withdrawals`

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@zzzckck zzzckck merged commit 089064c into bnb-chain:develop Sep 19, 2024
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.

3 participants