Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

fix(network): wrong connected consensus peer count #451

Conversation

zeroqn
Copy link
Contributor

@zeroqn zeroqn commented Sep 10, 2020

What this PR does / why we need it:
This PR fix wrong connected consensus peer counter.

When a session closed, we'll try to fetch this session info and use that session
info session.peer to check whether closed peer is consensus peer or not.
If session is not found, we simply return.

In this PR, we also try use peer id to fetch peer info if session not found.

Which issue(s) this PR fixes:

Fixes #

Which docs this PR relation:

Ref #

Which toolchain this PR adaption:

No Breaking Change

Special notes for your reviewer:

If session not found, consensus peer count will not be updated.
@muta-robot muta-robot added the lgtm #8ef42e label Sep 14, 2020
@muta-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KaoImin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@muta-robot muta-robot merged commit 43357fa into nervosnetwork:master Sep 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants