![]() |
Bitcoin Core
21.99.0
P2P Digital Currency
|
#include <primitives/transaction.h>
#include <script/script.h>
#include <serialize.h>
#include <span.h>
Go to the source code of this file.
Classes | |
struct | ScriptCompression |
Compact serializer for scripts. More... | |
struct | AmountCompression |
struct | TxOutCompression |
wrapper for CTxOut that provides a more compact serialization More... | |
Functions | |
bool | CompressScript (const CScript &script, std::vector< unsigned char > &out) |
unsigned int | GetSpecialScriptSize (unsigned int nSize) |
bool | DecompressScript (CScript &script, unsigned int nSize, const std::vector< unsigned char > &out) |
uint64_t | CompressAmount (uint64_t nAmount) |
Compress amount. More... | |
uint64_t | DecompressAmount (uint64_t nAmount) |
uint64_t CompressAmount | ( | uint64_t | nAmount | ) |
Compress amount.
nAmount is of type uint64_t and thus cannot be negative. If you're passing in a CAmount (int64_t), make sure to properly handle the case where the amount is negative before calling CompressAmount(...).
Definition at line 149 of file compressor.cpp.
bool CompressScript | ( | const CScript & | script, |
std::vector< unsigned char > & | out | ||
) |
Definition at line 55 of file compressor.cpp.
uint64_t DecompressAmount | ( | uint64_t | nAmount | ) |
bool DecompressScript | ( | CScript & | script, |
unsigned int | nSize, | ||
const std::vector< unsigned char > & | out | ||
) |
Definition at line 95 of file compressor.cpp.
unsigned int GetSpecialScriptSize | ( | unsigned int | nSize | ) |