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

Add tests on the messages exchanged when peers start replicating a core #623

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

HDegroote
Copy link
Contributor

No description provided.


const msgs = b.replicator.peers[0].stats
t.is(msgs.wireSync.tx, 3, 'wire syncs tx')
t.is(msgs.wireSync.rx, 3, 'wire syncs rx')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The non-sparse core might be oversending sync messages. It sends the same sync message 3 times:

 {
  fork: 0,
  length: 5,
  remoteLength: 0,
  canUpgrade: true,
  uploading: true,
  downloading: true,
  hasManifest: true
}

The empty cores first sends

{
  fork: 0,
  length: 0,
  remoteLength: 0,
  canUpgrade: true,
  uploading: true,
  downloading: true,
  hasManifest: false
}

It then sends a second message with updated remoteLength, and a third where both remoteLength and length are set to 5. That seems ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant