MCPcopy Create free account
hub / github.com/ElementsProject/elements / round

Method round

src/policy/fees.cpp:1015–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013}
1014
1015CAmount FeeFilterRounder::round(CAmount currentMinFee)
1016{
1017 std::set<double>::iterator it = feeset.lower_bound(currentMinFee);
1018 if ((it != feeset.begin() && insecure_rand.rand32() % 3 != 0) || it == feeset.end()) {
1019 it--;
1020 }
1021 return static_cast<CAmount>(*it);
1022}

Callers 3

MaybeSendFeefilterMethod · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80

Calls 4

lower_boundMethod · 0.80
rand32Method · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64