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

Method GetFee

src/policy/feerate.cpp:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23CAmount CFeeRate::GetFee(size_t nBytes_) const
24{
25 assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max()));
26 int64_t nSize = int64_t(nBytes_);
27
28 CAmount nFee = nSatoshisPerK * nSize / 1000;
29
30 if (nFee == 0 && nSize != 0) {
31 if (nSatoshisPerK > 0)
32 nFee = CAmount(1);
33 if (nSatoshisPerK < 0)
34 nFee = CAmount(-1);
35 }
36
37 return nFee;
38}
39
40std::string CFeeRate::ToString() const
41{

Callers 15

operator()Method · 0.80
AddToBlockMethod · 0.80
addPackageTxsMethod · 0.80
GetInfoFunction · 0.80
AcceptToMemoryPoolWorkerFunction · 0.80
operator()Method · 0.80
GetDustThresholdFunction · 0.80
processTransactionMethod · 0.80
processBlockTxMethod · 0.80
CreateTransactionFunction · 0.80
SelectCoinsMinConfMethod · 0.80
CreateTransactionMethod · 0.80

Calls 1

maxFunction · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64