-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Introduce script verification flags #2008
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
Conversation
|
99% ACK Prefer unsigned for flags-type variables... |
|
Some reason not to use an enum type? :p |
|
You cannot OR enum type elements together without them degenerating to an integer type, I think. |
|
GCC doesn't warn about it, at least. |
|
@sipa is correct. Storage class for enum is 'int', unless greater size is needed (int -> unsigned int -> long -> unsigned long -> etc., IIRC) |
|
Indeed, you can define flags using an enum, but you can't use the enum as parameter when you want to be able to specify multiple flags as it's no longer an enumeration. I believe Qt has a 'typesafe flags' type but that doesn't help us here :) I do think defining the flag values using an enum has a nicer syntax than a list of const XXX. And I agree with @jgarzik that it's better to have anything that you manipulate bitwise be unsigned. It steers clear of crazy undefined areas of C++, such as overflows flipping the sign bit. |
|
This might work, too, IIRC: |
|
Yes, it applies there too :) |
|
Updated. |
|
ACK |
1 similar comment
|
ACK |
These flags select features to be enabled/disabled during script evaluation/checking, instead of several booleans passed along. Currently these flags are defined: * SCRIPT_VERIFY_P2SH: enable BIP16-style subscript evaluation * SCRIPT_VERIFY_STRICTENC: enforce strict adherence to pubkey/sig encoding standards.
|
Updated. |
Introduce script verification flags
Introduce script verification flags
…itcoin#2008) * Check if in masternode mode first and only then do the job (or not) * address review comment Conflicts: src/privatesend-client.cpp src/privatesend-server.cpp
…elded coin control 563663b [BUG] label of coin type in send widget after shielded coin control (random-zebra) Pull request description: Simple visual bugfix. `labelAmountRemaining` not being updated with the proper coin-type "shielded", after selecting notes in coin control. Closes bitcoin#2002 ACKs for top commit: furszy: good, utACK 563663b Tree-SHA512: 942a171bc7de87a73cf8f8fcc1b2e6077d93a668e2c95da3ead292862bdc37decde192fa6f623938de88940c69b644837a95a5dd4084674f6371014d4eb7e17d
These flags select features to be enabled/disabled during script
evaluation/checking, instead of several booleans passed along.
Currently these flags are defined:
No semantic changes.