mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-28 00:16:04 +01:00
kernel: Add function for copying block data to C header
This adds a function for streaming bytes into a user-owned data structure. Use it in the tests for verifying the implementation of the validation interface's `BlockChecked` method.
This commit is contained in:
@@ -548,6 +548,11 @@ public:
|
||||
}
|
||||
|
||||
MAKE_RANGE_METHOD(Transactions, Block, &Block::CountTransactions, &Block::GetTransaction, *this)
|
||||
|
||||
std::vector<std::byte> ToBytes() const
|
||||
{
|
||||
return write_bytes(get(), btck_block_to_bytes);
|
||||
}
|
||||
};
|
||||
|
||||
inline void logging_disable()
|
||||
|
||||
Reference in New Issue
Block a user