Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Code cleanup in the sync module #11552

Merged
merged 6 commits into from
Mar 9, 2020
Merged

Code cleanup in the sync module #11552

merged 6 commits into from
Mar 9, 2020

Conversation

dvdplm
Copy link
Collaborator

@dvdplm dvdplm commented Mar 9, 2020

Reading code, fixing small things as I went: a few clones less, mark test-only code as such, some docs, unused params.

`flush_queue()` is mostly used by tests
remove some unused params
avoid clones in a few places
@dvdplm dvdplm self-assigned this Mar 9, 2020
@dvdplm dvdplm added A0-pleasereview 🤓 Pull request needs code review. A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). labels Mar 9, 2020
ethcore/src/client/client.rs Outdated Show resolved Hide resolved
ethcore/sync/src/blocks.rs Outdated Show resolved Hide resolved
ethcore/sync/src/blocks.rs Outdated Show resolved Hide resolved
dvdplm added 2 commits March 9, 2020 14:37
Consistent use of log calls
It'a actually not trivial to find out the size of these collections, likely we keep blocks from all kinds of forks in the `self.blocks`/`self.parents` collections and there's no good way to anticipate how many blocks we're going to drain. Most of the time we end up draining 0 blocks and then we drain a whole bunch of them, up to 30 000.
ethcore/sync/src/blocks.rs Outdated Show resolved Hide resolved
@ordian ordian added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Mar 9, 2020
@dvdplm dvdplm merged commit 9e77e7e into master Mar 9, 2020
@dvdplm dvdplm deleted the dp/chore/misc-sync-cleanup branch March 9, 2020 19:05
ordian added a commit that referenced this pull request Mar 10, 2020
* master:
  Code cleanup in the sync module (#11552)
  initial cleanup (#11542)
  Warn if genesis constructor revert (#11550)
  ethcore: cleanup after #11531 (#11546)
  license update (#11543)
  Less cloning when importing blocks (#11531)
  Github Actions (#11528)
  Fix Alpine Dockerfile (#11538)
  Remove AuxiliaryData/AuxiliaryRequest (#11533)
  [journaldb]: cleanup (#11534)
  Remove references to parity-ethereum (#11525)
  Drop IPFS support (#11532)
  chain-supplier: fix warning reporting for GetNodeData request (#11530)
  Faster kill_garbage (#11514)
  [EngineSigner]: don't sign message with only zeroes (#11524)
ordian added a commit that referenced this pull request Mar 24, 2020
* master:
  informant: display I/O stats (#11523)
  [devp2p discovery]: remove `deprecated_echo_hash` (#11564)
  [secretstore] create db_version file when database doesn't exist (#11570)
  Remove Parity's Security Policy (#11565)
  ethcore/res: enable ecip-1088 phoenix upgrade for kotti and mordor testnets (#11529)
  Misc docs and renames …and one less clone (#11556)
  [secretstore]: don't sign message with only zeroes (#11561)
  [devp2p discovery]: cleanup (#11547)
  Code cleanup in the sync module (#11552)
  initial cleanup (#11542)
  Warn if genesis constructor revert (#11550)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants