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

Fix wrong output format of peers #4270

Merged
merged 2 commits into from
Jan 23, 2017
Merged

Fix wrong output format of peers #4270

merged 2 commits into from
Jan 23, 2017

Conversation

ngotchac
Copy link
Contributor

It seems that from 1.6 the parity_netPeers RPC call could return peers with null protocol. The UI wouldn't properly work.

@ngotchac ngotchac added A0-pleasereview 🤓 Pull request needs code review. M7-ui labels Jan 23, 2017
@rphmeier
Copy link
Contributor

rphmeier commented Jan 23, 2017

Yes, this is a side effect of #3900. Sorry, this one is my fault; I should have made sure the jsapi wasn't broken.

@ngotchac
Copy link
Contributor Author

@rphmeier No worries, it's a small fix !

@@ -129,12 +129,31 @@ export function outNumber (number) {
return new BigNumber(number || 0);
}

export function outPeer (peer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would really have liked tests for this. (API is close to full coverage, not for the sake of coverage, but rather since it is such a critical piece.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Especially since what we are actually fixing is a bug - for those case need to have the original (doesn't break it) plus the new (this used to break) case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the tests

@jacogr jacogr added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jan 23, 2017
@ngotchac ngotchac merged commit b5a5328 into master Jan 23, 2017
@ngotchac ngotchac deleted the ng-fix-peers-rpc branch January 23, 2017 15:25
@ngotchac ngotchac mentioned this pull request Jan 25, 2017
jacogr pushed a commit that referenced this pull request Feb 6, 2017
* Fix wrong output format of peers

* Add outPeer tests
jacogr added a commit that referenced this pull request Feb 6, 2017
* Fix wrong output format of peers

* Add outPeer tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants