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

block: remove isTruthy and isFalsy #2256

Merged
merged 8 commits into from
Aug 31, 2022
Merged

Conversation

gabrocheleau
Copy link
Contributor

Extracts block from #2233

@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #2256 (9079538) into master (55ca254) will increase coverage by 0.20%.
The diff coverage is 91.66%.

Impacted file tree graph

Flag Coverage Δ
block 92.89% <91.66%> (?)
blockchain 88.47% <ø> (ø)
client 87.05% <ø> (ø)
common 98.09% <ø> (ø)
devp2p 92.45% <ø> (+0.08%) ⬆️
ethash ∅ <ø> (∅)
evm 79.25% <ø> (ø)
rlp ?
statemanager 88.47% <ø> (ø)
trie 89.43% <ø> (ø)
tx 97.98% <ø> (ø)
util 92.33% <ø> (ø)
vm 85.31% <ø> (ø)

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

const {
parentHash,
sha3Uncles,
miner,
stateRoot,
transactionsRoot,
receiptRoot,
receiptRoot, // TODO: Investigate dual receiptRoot/receiptsRoot usage.
Copy link
Member

Choose a reason for hiding this comment

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

This TODO can be removed, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, done by merging with master

Copy link
Member

@jochem-brouwer jochem-brouwer left a comment

Choose a reason for hiding this comment

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

Two points about types.

@@ -176,7 +176,7 @@ tape('[Block]: block functions', function (t) {
const common = new Common({ chain: Chain.Goerli, hardfork: Hardfork.Chainstart })

try {
blockFromRpc(testDataFromRpcGoerli, [], { common })
blockFromRpc(testDataFromRpcGoerli as any, [], { common })
Copy link
Member

Choose a reason for hiding this comment

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

Can cast this as JsonRPCBlock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes! done

common,
})
const blockDifficultyAsInteger = blockFromRpc(
blockDataDifficultyAsInteger as any,
Copy link
Member

Choose a reason for hiding this comment

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

Same in this file, guess those anys can be removed/changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed! done

jochem-brouwer
jochem-brouwer previously approved these changes Aug 30, 2022
Copy link
Member

@jochem-brouwer jochem-brouwer left a comment

Choose a reason for hiding this comment

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

If CI passes then OK! Thanks!

@gabrocheleau
Copy link
Contributor Author

Fixed, ready to approve @jochem-brouwer :)

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

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

LGTM with the noted changes. Let's merge it!

@gabrocheleau gabrocheleau merged commit 9587550 into master Aug 31, 2022
@gabrocheleau gabrocheleau deleted the block/remove-isTruthy-isFalsy branch August 31, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants