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

test: check pre-segwit peer error in getblockfrompeer RPC #25259

Conversation

theStack
Copy link
Contributor

This PR adds missing test coverage for the getblockfrompeer RPC, in the case that a block is tried to be fetched from a pre-segwit peer (i.e. a peer that doesn't signal the service bit NODE_WITNESS):

bitcoin/src/net_processing.cpp

Lines 1564 to 1565 in d4d9daf

// Ignore pre-segwit peers
if (!state->fHaveWitness) return "Pre-SegWit peer";

@DrahtBot DrahtBot added the Tests label May 31, 2022
@maflcko
Copy link
Member

maflcko commented Jun 1, 2022

cr ACK 7d0f67a

@maflcko maflcko merged commit beb18d3 into bitcoin:master Jun 1, 2022
@theStack theStack deleted the 202205-test-rpc-getblockfrompeer_check_presegwit_peer_error branch June 1, 2022 07:07
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 1, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants