MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / ValueFromAmount

Function ValueFromAmount

src/core_write.cpp:19–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17#include <utilstrencodings.h>
18
19UniValue ValueFromAmount(const CAmount& amount)
20{
21 bool sign = amount < 0;
22 int64_t n_abs = (sign ? -amount : amount);
23 int64_t quotient = n_abs / COIN;
24 int64_t remainder = n_abs % COIN;
25 return UniValue(UniValue::VNUM,
26 strprintf("%s%d.%08d", sign ? "-" : "", quotient, remainder));
27}
28
29std::string FormatScript(const CScript& script)
30{

Callers 15

TxToUnivFunction · 0.85
rest_getutxosFunction · 0.85
listaddressgroupingsFunction · 0.85
getreceivedbyaddressFunction · 0.85
getreceivedbylabelFunction · 0.85
getbalanceFunction · 0.85
getunconfirmedbalanceFunction · 0.85
ListReceivedFunction · 0.85
ListTransactionsFunction · 0.85
AcentryToJSONFunction · 0.85
listaccountsFunction · 0.85
gettransactionFunction · 0.85

Calls 1

UniValueClass · 0.70

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
GetJSONMethod · 0.68