-
Notifications
You must be signed in to change notification settings - Fork 296
replace:DataColumnIdentifier -> DataColumnsByRootIdentifier while root requesting
#7117
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
Conversation
| for colresp in columns: | ||
| let block_root = | ||
| hash_tree_root(colresp[].signed_block_header.message) | ||
| if block_root notin idList.mapIt(it.block_root): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to be in this PR, but in general, this is pointlessly allocating the mapIt-resulting seq.
It only consumes this as an iterator-equivalent and at no point does it need nor should it allocate all of idList.mapIt(it.block_root) (rather, it checks against foo1.block_root, foo2.block_root, in sequence).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it means that it's calculated a bunch of these ahead of the item it might detect a match
ethereum/consensus-specs#4284