Files
bitcoin/src
Ava Chow 1189702d2f Merge bitcoin/bitcoin#34982: kernel: Remove NONNULL annotation from destroy method
75608547b4 kernel: Remove NONNULL annotation from destroy method (Alexander Wiederin)

Pull request description:

  Follow-up to https://github.com/bitcoin/bitcoin/pull/33796#discussion_r2959817508

  ### Summary
  This PR removes the `BITCOINKERNEL_ARG_NONNULL` annotation from the `btck_block_validation_state_destroy` method in the Kernel API.

  ### Motivation
  No other *_destroy function in the Kernel API carries the NONNULL annotation. Following the convention set by free(), destroy functions should accept null pointers.

  ### Usage:
  Before:
  ```c
  btck_BlockValidationState* state = NULL;
  btck_block_validation_state_destroy(state); // violates nonnull contract
  ```

  After:
  ```c
  btck_BlockValidationState* state = NULL;
  btck_block_validation_state_destroy(state); // well-defined
  ```

ACKs for top commit:
  yuvicc:
    lgtm! ACK 75608547b4
  kevkevinpal:
    ACK [7560854](75608547b4)
  achow101:
    ACK 75608547b4
  janb84:
    ACK 75608547b4
  theStack:
    ACK 75608547b4
  w0xlt:
    ACK 75608547b4
  stickies-v:
    ACK 75608547b4

Tree-SHA512: 9577098940f49b8f7fd1fb20afe750e9eaaf9d90d25ec3c4f423de223a1fbd0bca6d520061f576eb3923f18e1f2744b3f60d0d0715dfa3832fea83cb538170c2
2026-04-01 11:34:13 -07:00
..