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

Method GetFee

src/policy/feerate.cpp:20–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20CAmount CFeeRate::GetFee(int32_t virtual_bytes) const
21{
22 Assume(virtual_bytes >= 0);
23 if (m_feerate.IsEmpty()) { return CAmount(0);}
24 CAmount nFee = CAmount(m_feerate.EvaluateFeeUp(virtual_bytes));
25 if (nFee == 0 && virtual_bytes != 0 && m_feerate.fee < 0) return CAmount(-1);
26 return nFee;
27}
28
29std::string CFeeRate::ToString(FeeRateFormat fee_rate_format) const
30{

Callers 15

GetInfoMethod · 0.45
addNewTransactionMethod · 0.45
removeUncheckedMethod · 0.45
checkMethod · 0.45
SendMessagesMethod · 0.45
FinalizeSubpackageMethod · 0.45
AcceptPackageMethod · 0.45
PaysForRBFFunction · 0.45
GetDustThresholdFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_FIXTURE_TEST_CASEFunction · 0.45

Calls 2

EvaluateFeeUpMethod · 0.80
IsEmptyMethod · 0.45

Tested by 11

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_FIXTURE_TEST_CASEFunction · 0.36
BOOST_FIXTURE_TEST_CASEFunction · 0.36
TestPackageSelectionMethod · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
FUZZ_TARGETFunction · 0.36
FUZZ_TARGETFunction · 0.36
TryAddToMempoolFunction · 0.36
MockMempoolMinFeeFunction · 0.36