Compress amount.
Synopsis
Declared in <compressor.h>
uint64_t
CompressAmount(uint64_t nAmount);
Description
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(...).
Return Value
The compressed amount encoding.
Parameters
Name |
Description |
nAmount |
The amount in satoshis to compress. |
Preconditions
-
Function defined only for 0 <= nAmount <= MAX_MONEY.
Created with MrDocs