qa: Fix service flag comparison check in rpc_net test (luke-jr)#16991
Merged
laanwj merged 1 commit intobitcoin:masterfrom Sep 30, 2019
Merged
qa: Fix service flag comparison check in rpc_net test (luke-jr)#16991laanwj merged 1 commit intobitcoin:masterfrom
laanwj merged 1 commit intobitcoin:masterfrom
Conversation
laanwj
added a commit
that referenced
this pull request
Sep 30, 2019
…luke-jr) 9c23ebd qa: Fix service flag comparison check in rpc_net test (Luke Dashjr) Pull request description: Rebase of #16936 ACKs for top commit: darosior: ACK 9c23ebd Tree-SHA512: 74f287740403da1040ab1e235ef6eba4e304f3ee5d57a3b25d1e2e1f2f982d256528d398a4d6cb24ba393798e680a8f46cd7dae54ed84ab2c747e96288f1f884
jasonbcox
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Oct 23, 2020
Summary: The tests added in [[bitcoin/bitcoin#16850 | PR16850]] assumed that the field `localservices` returned by `getnetworkinfo` was a string representation of an integer, when it is really a string representation of a hex. This fixes the test to decode the field properly and do the correct bitwise comparisons. This is a backport of Core [[bitcoin/bitcoin#16991 | PR16991]] Test Plan: `ninja && ./test/functional/test_runner.py rpc_net.py` ``` $ bitcoin-cli getnetworkinfo ... "localservices": "0000000000000425", "localservicesnames": [ "NETWORK", "BLOOM", "BITCOIN_CASH", "NETWORK_LIMITED" ], ... $ python >>> int("425", 16) 1061 >>> NODE_NETWORK = (1 << 0) >>> NODE_BLOOM = (1 << 2) >>> NODE_BITCOIN_CASH = (1 << 5) >>> NODE_NETWORK_LIMITED = (1 << 10) >>> NODE_NETWORK | NODE_BLOOM | NODE_BITCOIN_CASH | NODE_NETWORK_LIMITED 1061 >>> ``` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, Fabien Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix, Fabien Differential Revision: https://reviews.bitcoinabc.org/D8083
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebase of #16936