diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-07-20 15:35:31 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-07-20 15:36:23 +0200 |
commit | 9faa4b68db80a4a5c1f5a4e0484d804d7b5e1493 (patch) | |
tree | e84cff4f95724b24e58865202cb0a0f311c62b49 /src/script/interpreter.h | |
parent | 3d8c714d8e79921e51876cf003ee40a201f6b44f (diff) | |
parent | fa621ededdfe31a200b77a8787de7e3d2e667aec (diff) |
Merge bitcoin/bitcoin#22232: refactor: Pass interpreter flags as uint32_t instead of signed int
fa621ededdfe31a200b77a8787de7e3d2e667aec refactor: Pass script verify flags as uint32_t (MarcoFalke)
Pull request description:
The flags are cast to unsigned in the interpreter anyway, so avoid the confusion (and fuzz crashes) by just passing them as unsigned from the beginning.
Also, the flags are often inverted bit-wise with the `~` operator, which also works on signed integers, but might cause confusion as the sign bit is flipped.
Fixes #22233
ACKs for top commit:
theStack:
Concept and code review ACK fa621ededdfe31a200b77a8787de7e3d2e667aec
kristapsk:
ACK fa621ededdfe31a200b77a8787de7e3d2e667aec
jonatack:
ACK fa621ededdfe31a200b77a8787de7e3d2e667aec
Tree-SHA512: ea0720f32f823fa7f075309978672aa39773c6019d12b6c1c9d611fc1983a76115b7fe2a28d50814673bb6415c311ccc05b99d6e871575fb6900faf75ed17769
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r-- | src/script/interpreter.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h index 034c937b99..37ae713996 100644 --- a/src/script/interpreter.h +++ b/src/script/interpreter.h @@ -39,8 +39,7 @@ enum * All flags are intended to be soft forks: the set of acceptable scripts under * flags (A | B) is a subset of the acceptable scripts under flag (A). */ -enum -{ +enum : uint32_t { SCRIPT_VERIFY_NONE = 0, // Evaluate P2SH subscripts (BIP16). |