Skip to content

Conversation

brunoerg
Copy link
Contributor

This PR adds test coverage for the following init error:

bitcoin/src/init.cpp

Lines 917 to 919 in b9ef5a1

if (!IsHexNumber(minChainWorkStr)) {
return InitError(strprintf(Untranslated("Invalid non-hex (%s) minimum chain work value specified"), minChainWorkStr));
}

Passing a non-hex value to -minimumchainwork should throw an initial error.

@fanquake fanquake added the Tests label May 30, 2022
Copy link
Contributor

@w0xlt w0xlt left a comment

Choose a reason for hiding this comment

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

Approach ACK

Copy link
Contributor

@kristapsk kristapsk left a comment

Choose a reason for hiding this comment

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

ACK 49fe179

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24178 (p2p: Respond to getheaders if we have sufficient chainwork by sdaftuar)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@brunoerg brunoerg force-pushed the 2022-05-minimumchainwork-nonhex branch from 49fe179 to ebfc308 Compare May 31, 2022 11:24
@brunoerg
Copy link
Contributor Author

Rebased

Copy link
Contributor

@kristapsk kristapsk left a comment

Choose a reason for hiding this comment

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

re-ACK ebfc308

@laanwj
Copy link
Member

laanwj commented May 31, 2022

Code review ACK ebfc308

@maflcko maflcko merged commit 1f932de into bitcoin:master May 31, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 31, 2022
…chainwork

ebfc308 test: add coverage for non-hex value to -minimumchainwork (brunoerg)

Pull request description:

  This PR adds test coverage for the following init error:
  https://github.com/bitcoin/bitcoin/blob/b9ef5a10e2fa4609d048db57b99463305455ebe4/src/init.cpp#L917-L919

  Passing a non-hex value to -minimumchainwork should throw an initial error.

ACKs for top commit:
  laanwj:
    Code review ACK ebfc308
  kristapsk:
    re-ACK ebfc308

Tree-SHA512: c665903757ae3b8b2480df97bb888e60ba4387b009fcb8031041822e87a155a0e4950ebe79873c1034f0826504521d82b1fdfdb5e8378b227d14ca545b8d4e11
@bitcoin bitcoin locked and limited conversation to collaborators May 31, 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.

7 participants