Skip to content

Commit 29c3b09

Browse files
committed
Squashed 'libbitcoinkernel-sys/bitcoin/' changes from e95efc00842..6c7a34f3b0b
6c7a34f3b0b kernel: Add Purpose section to header documentation 7e9f00bcc17 kernel: Allowing reducing exports 7990463b105 kernel: Add pure kernel bitcoin-chainstate 36ec9a3ea23 Kernel: Add functions for working with outpoints 5eec7fa96aa kernel: Add block hash type and block tree utility functions to C header f5d5d1213cc kernel: Add function to read block undo data from disk to C header 09d0f626388 kernel: Add functions to read block from disk to C header a263a4caf23 kernel: Add function for copying block data to C header b30e15f4329 kernel: Add functions for the block validation state to C header aa262da7bcf kernel: Add validation interface to C header d27e27758d5 kernel: Add interrupt function to C header 1976b13be9c kernel: Add import blocks function to C header a747ca1f516 kernel: Add chainstate load options for in-memory dbs in C header 070e77732cd kernel: Add options for reindexing in C header ad80abc73df kernel: Add block validation to C header cb1590b05ef kernel: Add chainstate loading when instantiating a ChainstateManager e2c1bd3d713 kernel: Add chainstate manager option for setting worker threads 65571c36a26 kernel: Add chainstate manager object to C header c62f657ba33 kernel: Add notifications context option to C header 9e1bac45852 kernel: Add chain params context option to C header 337ea860dfd kernel: Add kernel library context object 28d679bad9f kernel: Add logging to kernel library C header 2cf136dec4c kernel: Introduce initial kernel C header API REVERT: e95efc00842 kernel: Add Purpose section to header documentation REVERT: 6b61ae6cbfb kernel: Allowing reducing exports REVERT: d0f3c29c5a6 kernel: Add pure kernel bitcoin-chainstate REVERT: 574ca377557 Kernel: Add functions for working with outpoints REVERT: dc91006a7f5 kernel: Add block hash type and block tree utility functions to C header REVERT: 06e8f52f589 kernel: Add function to read block undo data from disk to C header REVERT: 5103abeb636 kernel: Add functions to read block from disk to C header REVERT: 68b2a8d7b7c kernel: Add function for copying block data to C header REVERT: 6970d6f7f63 kernel: Add functions for the block validation state to C header REVERT: ccefe9f8f8c kernel: Add validation interface to C header REVERT: 5c8c23b9fe1 kernel: Add interrupt function to C header REVERT: eb029703f81 kernel: Add import blocks function to C header REVERT: 3d969fae26f kernel: Add chainstate load options for in-memory dbs in C header REVERT: 5215d05b4b6 kernel: Add options for reindexing in C header REVERT: cd83907b1d9 kernel: Add block validation to C header REVERT: 73b92d519db kernel: Add chainstate loading when instantiating a ChainstateManager REVERT: c39464d1975 kernel: Add chainstate manager option for setting worker threads REVERT: c1a6def012a kernel: Add chainstate manager object to C header REVERT: 06cba4a4653 kernel: Add notifications context option to C header REVERT: cd809dcae8f kernel: Add chain params context option to C header REVERT: cf9f9b18474 kernel: Add kernel library context object REVERT: 776c879eaf7 kernel: Add logging to kernel library C header REVERT: e3b2e01811f kernel: Introduce initial kernel C header API git-subtree-dir: libbitcoinkernel-sys/bitcoin git-subtree-split: 6c7a34f3b0bd39ef7a1520aac56e12f78e5cc969
1 parent 1797bdf commit 29c3b09

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/kernel/bitcoinkernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class WriterStream
8484
void write(std::span<const std::byte> src)
8585
{
8686
if (m_writer(std::data(src), src.size(), m_user_data) != 0) {
87-
throw std::runtime_error("Failed to write serilization data");
87+
throw std::runtime_error("Failed to write serialization data");
8888
}
8989
}
9090

src/kernel/bitcoinkernel.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C" {
5252
*
5353
* This header currently exposes an API for interacting with parts of Bitcoin
5454
* Core's consensus code. Users can validate blocks, iterate the block index,
55-
* read block und undo data from disk, and validate scripts. The header is
55+
* read block and undo data from disk, and validate scripts. The header is
5656
* unversioned and not stable yet. Users should expect breaking changes. It is
5757
* also not yet included in releases of Bitcoin Core.
5858
*
@@ -486,7 +486,7 @@ BITCOINKERNEL_API btck_Transaction* BITCOINKERNEL_WARN_UNUSED_RESULT btck_transa
486486
BITCOINKERNEL_API btck_Transaction* BITCOINKERNEL_WARN_UNUSED_RESULT btck_transaction_copy(
487487
const btck_Transaction* transaction) BITCOINKERNEL_ARG_NONNULL(1);
488488

489-
/*
489+
/**
490490
* @brief Serializes the transaction through the passed in callback to bytes.
491491
* This is consensus serialization that is also used for the P2P network.
492492
*
@@ -516,7 +516,7 @@ BITCOINKERNEL_API size_t BITCOINKERNEL_WARN_UNUSED_RESULT btck_transaction_count
516516
* transaction.
517517
*
518518
* @param[in] transaction Non-null.
519-
* @param[in] output_index The index of the transaction to be retrieved.
519+
* @param[in] output_index The index of the transaction output to be retrieved.
520520
* @return The transaction output
521521
*/
522522
BITCOINKERNEL_API const btck_TransactionOutput* BITCOINKERNEL_WARN_UNUSED_RESULT btck_transaction_get_output_at(
@@ -586,7 +586,7 @@ BITCOINKERNEL_API btck_ScriptPubkey* BITCOINKERNEL_WARN_UNUSED_RESULT btck_scrip
586586
/**
587587
* @brief Verify if the input at input_index of tx_to spends the script pubkey
588588
* under the constraints specified by flags. If the
589-
* `btck_SCRIPT_FLAGS_VERIFY_WITNESS` flag is set in the flags bitfield, the
589+
* `btck_ScriptVerificationFlags_WITNESS` flag is set in the flags bitfield, the
590590
* amount parameter is used. If the taproot flag is set, the spent outputs
591591
* parameter is used to validate taproot transactions.
592592
*
@@ -598,7 +598,7 @@ BITCOINKERNEL_API btck_ScriptPubkey* BITCOINKERNEL_WARN_UNUSED_RESULT btck_scrip
598598
* outputs spent by the transaction.
599599
* @param[in] spent_outputs_len Length of the spent_outputs array.
600600
* @param[in] input_index Index of the input in tx_to spending the script_pubkey.
601-
* @param[in] flags Bitfield of btck_ScriptFlags controlling validation constraints.
601+
* @param[in] flags Bitfield of btck_ScriptVerificationFlags controlling validation constraints.
602602
* @param[out] status Nullable, will be set to an error code if the operation fails, or OK otherwise.
603603
* @return 1 if the script is valid, 0 otherwise.
604604
*/
@@ -611,7 +611,7 @@ BITCOINKERNEL_API int BITCOINKERNEL_WARN_UNUSED_RESULT btck_script_pubkey_verify
611611
unsigned int flags,
612612
btck_ScriptVerifyStatus* status) BITCOINKERNEL_ARG_NONNULL(1, 3);
613613

614-
/*
614+
/**
615615
* @brief Serializes the script pubkey through the passed in callback to bytes.
616616
*
617617
* @param[in] script_pubkey Non-null.
@@ -730,7 +730,7 @@ BITCOINKERNEL_API void btck_logging_set_level_category(btck_LogCategory category
730730
* changes a global setting and will override settings for all existing @ref
731731
* btck_LoggingConnection instances.
732732
*
733-
* @param[in] category If btck_LOG_ALL is chosen, all categories will be enabled.
733+
* @param[in] category If btck_LogCategory_ALL is chosen, all categories will be enabled.
734734
*/
735735
BITCOINKERNEL_API void btck_logging_enable_category(btck_LogCategory category);
736736

@@ -739,7 +739,7 @@ BITCOINKERNEL_API void btck_logging_enable_category(btck_LogCategory category);
739739
* changes a global setting and will override settings for all existing @ref
740740
* btck_LoggingConnection instances.
741741
*
742-
* @param[in] category If btck_LOG_ALL is chosen, all categories will be disabled.
742+
* @param[in] category If btck_LogCategory_ALL is chosen, all categories will be disabled.
743743
*/
744744
BITCOINKERNEL_API void btck_logging_disable_category(btck_LogCategory category);
745745

@@ -1148,7 +1148,7 @@ BITCOINKERNEL_API size_t BITCOINKERNEL_WARN_UNUSED_RESULT btck_block_count_trans
11481148
BITCOINKERNEL_API const btck_Transaction* BITCOINKERNEL_WARN_UNUSED_RESULT btck_block_get_transaction_at(
11491149
const btck_Block* block, size_t transaction_index) BITCOINKERNEL_ARG_NONNULL(1);
11501150

1151-
/*
1151+
/**
11521152
* @brief Calculate and return the hash of a block.
11531153
*
11541154
* @param[in] block Non-null.
@@ -1157,7 +1157,7 @@ BITCOINKERNEL_API const btck_Transaction* BITCOINKERNEL_WARN_UNUSED_RESULT btck_
11571157
BITCOINKERNEL_API btck_BlockHash* BITCOINKERNEL_WARN_UNUSED_RESULT btck_block_get_hash(
11581158
const btck_Block* block) BITCOINKERNEL_ARG_NONNULL(1);
11591159

1160-
/*
1160+
/**
11611161
* @brief Serializes the block through the passed in callback to bytes.
11621162
* This is consensus serialization that is also used for the P2P network.
11631163
*
@@ -1219,10 +1219,10 @@ BITCOINKERNEL_API const btck_BlockTreeEntry* BITCOINKERNEL_WARN_UNUSED_RESULT bt
12191219
* @param[in] chain Non-null.
12201220
* @return The current height.
12211221
*/
1222-
BITCOINKERNEL_API int BITCOINKERNEL_WARN_UNUSED_RESULT btck_chain_get_height(
1222+
BITCOINKERNEL_API int32_t BITCOINKERNEL_WARN_UNUSED_RESULT btck_chain_get_height(
12231223
const btck_Chain* chain) BITCOINKERNEL_ARG_NONNULL(1);
12241224

1225-
/*
1225+
/**
12261226
* @brief Get the block tree entry of the genesis block.
12271227
*
12281228
* @param[in] chain Non-null.

src/kernel/bitcoinkernel_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ class ChainView : public View<btck_Chain>
972972
return btck_chain_get_tip(get());
973973
}
974974

975-
int Height() const
975+
int32_t Height() const
976976
{
977977
return btck_chain_get_height(get());
978978
}

0 commit comments

Comments
 (0)