Fewer zeroes, plus check bit to make sure it value is valid.
Signed-off-by: Rusty Russell rusty@rustcorp.com.au
Fewer zeroes, plus check bit to make sure it value is valid.
Signed-off-by: Rusty Russell rusty@rustcorp.com.au
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ut ACK
155 | +# define SECP256K1_CONTEXT_SIGN (SECP256K1_CONTEXT_SIGN_BIT|SECP256K1_CONTEXT_CHECK_BIT) 156 | +# define SECP256K1_CONTEXT_NONE (SECP256K1_CONTEXT_CHECK_BIT) 157 | + 158 | +# define SECP256K1_CONTEXT_VERIFY_BIT (1 << 2) 159 | +# define SECP256K1_CONTEXT_SIGN_BIT (2 << 2) 160 | +# define SECP256K1_CONTEXT_CHECK_BIT (1)
I'd prefer VERIFY and SIGN to be (1 << 0) and (1 << 1); COMPRESSED should also be (1 << 0), and in general the actual flags should be written as (1 << n) for increasing n.
The CHECK_BITs would then need to be something high, maybe (1 << 10), (1 << 11), etc, which would give us room for ten flags in each of five different flag categories, while still fitting into a 16-bit int.
Can you add [API BREAK] to the title of this PR?
Also concept ACK.