Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@svyatonik
Copy link
Contributor

Inserting empty set into the ImportQueue leads to unnecessary thread wakeups + dumb messages that are spoiling log (like Imported 0 of 0).

Also have altered/added two traces. So now log is more detailed:

2018-07-27 11:05:14  TRACE sync  BlockResponse 0 from 3 with 1 blocks (830934)
2018-07-27 11:05:15  TRACE sync  BlockResponse 1 from 3 with 71 blocks (831063..831133)
2018-07-27 11:05:15 ImportQueue TRACE sync  Starting import of 199 blocks (830935..831133)
2018-07-27 11:05:20 ImportQueue TRACE sync  Starting import of 1 blocks (831134)

@svyatonik svyatonik added the A2-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). label Jul 27, 2018
@arkpar
Copy link
Member

arkpar commented Jul 27, 2018

CI failed because substrate-network-libp2p takes ages to compile

Copy link
Contributor

@pepyakin pepyakin left a comment

Choose a reason for hiding this comment

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

Minor style nit

trace!(target: "sync", "BlockResponse {} from {} with {} blocks", response.id, peer, response.blocks.len());
trace!(target: "sync", "BlockResponse {} from {} with {} blocks{}",
response.id, peer, response.blocks.len(),
match (
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's avoid such big expressions as an argument, especially when used in positional formatting.

let mut imported = 0;

trace!(target:"sync", "Starting import of {} blocks{}", count,
match (
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's avoid such big expressions as an argument, especially when used in positional formatting.

@gavofyork gavofyork merged commit 4a124ab into master Jul 27, 2018
@gavofyork gavofyork deleted the fix_queuing_empty_set branch July 27, 2018 14:09
dvdplm added a commit that referenced this pull request Jul 30, 2018
* master: (86 commits)
  Make contract a separate runtime module (#345)
  Version bump (#450)
  DB-based blockchain data cache for light nodes (#251)
  Update libp2p again (#445)
  Update version on git head change (#444)
  Fix the public key of bootnode 3 (#441)
  Update libp2p (#442)
  Switch to the master branch of libp2p (#427)
  Export ws port 9944 and add doc (#440)
  Iterate over overlay to decide which keys to purge (#436)
  Exit signal gets its own trait (#433)
  Add docker image (#375)
  Reset peers.json if the content is not loadable (#405)
  Limit number of incoming connections (#391)
  Fix memory leaks in libp2p (#432)
  Do not queue empty blocks set for import (#431)
  5 random fixes (#1) (#435)
  Chore: fix typo (#434)
  Prevent building invalid blocks (#430)
  Better logging for public key mismatch (#429)
  ...
lamafab pushed a commit to lamafab/substrate that referenced this pull request Jun 16, 2020
* Update branches

* Bump runtime.

* Update again.
liuchengxu pushed a commit to autonomys/substrate that referenced this pull request Jun 3, 2022
…tor-part-3

Refactor cirrus executor (part 3)
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).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants