kernel: Use enumeration type for flags argument
What changed, and why it matters
This is a tiny, non-functional code cleanup in Bitcoin Core's public C kernel API header. It changes one function parameter from a plain unsigned integer to a named enumeration type, and fixes a grammar typo in a comment. There is no security relevance.
No security action needed. Treat as a normal API/type-safety cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies src/kernel/bitcoinkernel.h only. It replaces the unsigned int flags parameter of btck_script_pubkey_verify with the already-defined btck_ScriptVerificationFlags enumeration type, improving type safety for callers of the kernel library. It also corrects ‘A un-recoverable’ to ‘An unrecoverable’ in a comment. No logic, validation rules, or behavior changes are present in the diff.
Changed components
src/kernel/bitcoinkernel.h public C API headerInspect captured patch +2 / −2
diff --git a/src/kernel/bitcoinkernel.h b/src/kernel/bitcoinkernel.h
index 99ae2bd6..add45f4b 100644
--- a/src/kernel/bitcoinkernel.h
+++ b/src/kernel/bitcoinkernel.h
@@ -386,7 +386,7 @@ typedef struct {
btck_NotifyWarningSet warning_set; //!< A warning issued by the kernel library during validation.
btck_NotifyWarningUnset warning_unset; //!< A previous condition leading to the issuance of a warning is no longer given.
btck_NotifyFlushError flush_error; //!< An error encountered when flushing data to disk.
- btck_NotifyFatalError fatal_error; //!< A un-recoverable system error encountered by the library.
+ btck_NotifyFatalError fatal_error; //!< An unrecoverable system error encountered by the library.
} btck_NotificationInterfaceCallbacks;
/**
@@ -608,7 +608,7 @@ BITCOINKERNEL_API int BITCOINKERNEL_WARN_UNUSED_RESULT btck_script_pubkey_verify
const btck_Transaction* tx_to,
const btck_TransactionOutput** spent_outputs, size_t spent_outputs_len,
unsigned int input_index,
- unsigned int flags,
+ btck_ScriptVerificationFlags flags,
btck_ScriptVerifyStatus* status) BITCOINKERNEL_ARG_NONNULL(1, 3);
/**
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.