mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
compressor: Make the domain of CompressAmount(...) explicit
This commit is contained in:
parent
4a7fd7a712
commit
7e9c7113af
1 changed files with 10 additions and 0 deletions
|
@ -19,7 +19,17 @@ 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);
|
||||
|
||||
/**
|
||||
* 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(...).
|
||||
*
|
||||
* @pre Function defined only for 0 <= nAmount <= MAX_MONEY.
|
||||
*/
|
||||
uint64_t CompressAmount(uint64_t nAmount);
|
||||
|
||||
uint64_t DecompressAmount(uint64_t nAmount);
|
||||
|
||||
/** Compact serializer for scripts.
|
||||
|
|
Loading…
Add table
Reference in a new issue