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

Replace getByBlockNumber by getByBlockHeader #5020

Conversation

gfukushima
Copy link
Contributor

@gfukushima gfukushima commented Jan 30, 2023

PR description

First batch that replaces getByBlockNumber by getByBlockHeader. These batch includes trivial replacements with none or minimal changes to the logic of the code base.

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
@gfukushima gfukushima marked this pull request as ready for review January 31, 2023 22:45
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

LGTM. couple of comments

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Copy link
Contributor

@siladu siladu left a comment

Choose a reason for hiding this comment

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

LGTM

@gfukushima gfukushima enabled auto-merge (squash) February 5, 2023 10:27
@gfukushima gfukushima added TeamGroot GH issues worked on by Groot Team mainnet EIP Ethereum Improvement Proposal labels Feb 5, 2023
@gfukushima gfukushima disabled auto-merge February 5, 2023 10:31
@gfukushima gfukushima changed the title Replace get by block number by get by block header Replace getByBlockNumber by getByBlockHeader Feb 5, 2023
@gfukushima gfukushima merged commit 9ceebc4 into hyperledger:main Feb 5, 2023
jframe added a commit to jframe/besu that referenced this pull request Feb 8, 2023
jframe added a commit to jframe/besu that referenced this pull request Feb 8, 2023
This reverts commit 9ceebc4.

Signed-off-by: Jason Frame <jason.frame@consensys.net>
jframe added a commit that referenced this pull request Feb 8, 2023
This reverts commit 9ceebc4.

Signed-off-by: Jason Frame <jason.frame@consensys.net>
shemnon pushed a commit to shemnon/besu that referenced this pull request Feb 8, 2023
* Replace getByBlockNumber by getByBlockHeader where trivial

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rolledback change since tests will need non trivial changes

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rollback replace

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Change other 2 trivial tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* spotless

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Pass ProcessableBlockHeader to the mocks

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Replace getByBlockNumber by getByBlockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add mock of blockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Use any() for the tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add unit test for headBlockHeader()

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

---------

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
@siladu
Copy link
Contributor

siladu commented Feb 8, 2023

Bug found during goerli sync: #5064

shemnon pushed a commit to shemnon/besu that referenced this pull request Feb 9, 2023
* Replace getByBlockNumber by getByBlockHeader where trivial

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rolledback change since tests will need non trivial changes

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rollback replace

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Change other 2 trivial tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* spotless

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Pass ProcessableBlockHeader to the mocks

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Replace getByBlockNumber by getByBlockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add mock of blockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Use any() for the tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add unit test for headBlockHeader()

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

---------

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
ensi321 pushed a commit to ensi321/besu that referenced this pull request Feb 19, 2023
* Replace getByBlockNumber by getByBlockHeader where trivial

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rolledback change since tests will need non trivial changes

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rollback replace

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Change other 2 trivial tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* spotless

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Pass ProcessableBlockHeader to the mocks

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Replace getByBlockNumber by getByBlockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add mock of blockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Use any() for the tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add unit test for headBlockHeader()

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

---------

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
ensi321 pushed a commit to ensi321/besu that referenced this pull request Feb 19, 2023
…" (hyperledger#5063)

This reverts commit 9ceebc4.

Signed-off-by: Jason Frame <jason.frame@consensys.net>
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
* Replace getByBlockNumber by getByBlockHeader where trivial

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rolledback change since tests will need non trivial changes

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rollback replace

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Change other 2 trivial tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* spotless

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Pass ProcessableBlockHeader to the mocks

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Replace getByBlockNumber by getByBlockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add mock of blockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Use any() for the tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add unit test for headBlockHeader()

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

---------

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
elenduuche pushed a commit to elenduuche/besu that referenced this pull request Aug 16, 2023
…" (hyperledger#5063)

This reverts commit 9ceebc4.

Signed-off-by: Jason Frame <jason.frame@consensys.net>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
* Replace getByBlockNumber by getByBlockHeader where trivial

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Fix tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rolledback change since tests will need non trivial changes

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Rollback replace

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Change other 2 trivial tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* spotless

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Pass ProcessableBlockHeader to the mocks

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Replace getByBlockNumber by getByBlockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add mock of blockHeader

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Use any() for the tests

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

* Add unit test for headBlockHeader()

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>

---------

Signed-off-by: Gabriel Fukushima <gabrielfukushima@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…" (hyperledger#5063)

This reverts commit 9ceebc4.

Signed-off-by: Jason Frame <jason.frame@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EIP Ethereum Improvement Proposal mainnet TeamGroot GH issues worked on by Groot Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants