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

Fix assertion in CKey::SignCompact #15299

Merged
merged 1 commit into from Jan 31, 2019
Merged

Conversation

@promag
Copy link
Member

@promag promag commented Jan 31, 2019

Fixes #15286.

@laanwj
Copy link
Member

@laanwj laanwj commented Jan 31, 2019

utACK 3617f11

@practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Jan 31, 2019

utACK 3617f11

This is why I love [[nodiscard]] :-)

@Empact
Copy link
Member

@Empact Empact commented Jan 31, 2019

utACK 3617f11

@laanwj laanwj merged commit 3617f11 into bitcoin:master Jan 31, 2019
1 check passed
laanwj added a commit that referenced this issue Jan 31, 2019
3617f11 Fix assertion in CKey::SignCompact (João Barbosa)

Pull request description:

  Fixes #15286.

Tree-SHA512: b39b6f26f87cf1850b13f625ab6de963937b6ecb5b6d4ac4932134f0491a6c0fa61c6d6e6980e8b1770775578dc365fdd1b6ba426bba1f7c23430f68b3a2339a
@maaku
Copy link
Contributor

@maaku maaku commented Jan 31, 2019

Already merged, but FWIW this is just as redundant. secp256k1_ecdsa_recoverable_signature_serialize_compact always returns 1; the serialization function semantics are that they never fail. No check is required.

@laanwj
Copy link
Member

@laanwj laanwj commented Jan 31, 2019

secp256k1_ecdsa_recoverable_signature_serialize_compact always returns 1; the serialization function semantics are that they never fail. No check is required.

That's true—however, as long as it has a return value, I think it's correct to check it. It might start to do error handling in the future.

jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Oct 1, 2020
Summary:
The second assertion was testing the same condition as the first one.

Backport of Core [[bitcoin/bitcoin#15299 | PR15299]]

Test Plan: `ninja && ninja check-all`

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien, deadalnix

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7704
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this issue Jun 27, 2021
3617f11 Fix assertion in CKey::SignCompact (João Barbosa)

Pull request description:

  Fixes bitcoin#15286.

Tree-SHA512: b39b6f26f87cf1850b13f625ab6de963937b6ecb5b6d4ac4932134f0491a6c0fa61c6d6e6980e8b1770775578dc365fdd1b6ba426bba1f7c23430f68b3a2339a
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this issue Jun 28, 2021
3617f11 Fix assertion in CKey::SignCompact (João Barbosa)

Pull request description:

  Fixes bitcoin#15286.

Tree-SHA512: b39b6f26f87cf1850b13f625ab6de963937b6ecb5b6d4ac4932134f0491a6c0fa61c6d6e6980e8b1770775578dc365fdd1b6ba426bba1f7c23430f68b3a2339a
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this issue Jun 28, 2021
3617f11 Fix assertion in CKey::SignCompact (João Barbosa)

Pull request description:

  Fixes bitcoin#15286.

Tree-SHA512: b39b6f26f87cf1850b13f625ab6de963937b6ecb5b6d4ac4932134f0491a6c0fa61c6d6e6980e8b1770775578dc365fdd1b6ba426bba1f7c23430f68b3a2339a
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this issue Jun 29, 2021
3617f11 Fix assertion in CKey::SignCompact (João Barbosa)

Pull request description:

  Fixes bitcoin#15286.

Tree-SHA512: b39b6f26f87cf1850b13f625ab6de963937b6ecb5b6d4ac4932134f0491a6c0fa61c6d6e6980e8b1770775578dc365fdd1b6ba426bba1f7c23430f68b3a2339a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants