-
Notifications
You must be signed in to change notification settings - Fork 1.7k
removed redundant clone before each block import #9683
Conversation
bail!(EthcoreErrorKind::Block(BlockError::UnknownParent(unverified.parent_hash()))); | ||
} | ||
|
||
let raw = unverified.bytes.clone(); |
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.
redundant block clone
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.
Another approach would be to move let raw = unverified.bytes.clone();
under bad_block reporting match, it would be ok, since it's not a common path.
ethcore/src/client/client.rs
Outdated
// we only care about block errors (not import errors) | ||
Err(EthcoreError(EthcoreErrorKind::Block(err), _))=> { | ||
self.importer.bad_blocks.report(raw, format!("{:?}", err)); | ||
Err((block, EthcoreError(EthcoreErrorKind::Block(err), _)))=> { |
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.
nit: space before =>
@ordian you cannot do that cause |
…mon-deps * origin/master: fix (light/provider) : Make `read_only executions` read-only (#9591) ethcore: fix detection of major import (#9552) return 0 on error (#9705) ethcore: delay ropsten hardfork (#9704) make instantSeal engine backwards compatible, closes #9696 (#9700) Implement CREATE2 gas changes and fix some potential overflowing (#9694) Don't hash the init_code of CREATE. (#9688) ethcore: minor optimization of modexp by using LR exponentiation (#9697) removed redundant clone before each block import (#9683)
No description provided.