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

Add debug print for intermediate values #200

Merged
merged 5 commits into from
Apr 2, 2020

Conversation

real-or-random
Copy link

@real-or-random real-or-random commented Mar 4, 2020

solves #188

Tell me if I overdid it. But I think it's still readable, in particular if you have syntax highlighting and the comments are displayed differently.

This also adjusts the variables to match the BIP text.

I should have based this on top of #196, sorry. Let's first get #196 merged and I can rebase.

Copy link

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

I like the idea of adding debug prints, but readability is arguably worse. How about instead of # print("bla") we define a function debug_print(...) that takes an array, and prints every element if global variable DEBUG is set to true? This should reduce the number of lines and avoids having to uncomment line-by-line to have debug output.

@real-or-random
Copy link
Author

That sounds reasonable.

bip-0340/reference.py Outdated Show resolved Hide resolved
bip-0340/reference.py Show resolved Hide resolved
bip-0340/reference.py Outdated Show resolved Hide resolved
This is better for playing around with the code. Now these
these exceptions can really be raised when the verification
during signing fails.
@real-or-random
Copy link
Author

fixed, and added another commit that improves checking of the test vectors

Copy link

@jonasnick jonasnick left a comment

Choose a reason for hiding this comment

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

ACK

@sipa
Copy link
Owner

sipa commented Apr 2, 2020

ACK

@sipa sipa merged commit 038615b into sipa:bip-taproot Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants