aboutsummaryrefslogtreecommitdiff
path: root/src/policy
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-11-10 19:32:50 +0100
committerJon Atack <jon@atack.com>2020-11-11 15:55:53 +0100
commit6112cf20d43b0be34fe0edce2ac3e6b27cae1bbe (patch)
tree15c7e27f4df50706d028caa3c37e1514ea85f6f1 /src/policy
parent3f7279161347543ce4e997d78ea89a4043491145 (diff)
downloadbitcoin-6112cf20d43b0be34fe0edce2ac3e6b27cae1bbe.tar.xz
wallet: add CFeeRate ctor doxygen documentation
as requested by reviewers
Diffstat (limited to 'src/policy')
-rw-r--r--src/policy/feerate.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/policy/feerate.h b/src/policy/feerate.h
index 883940f73c..0f2bff1909 100644
--- a/src/policy/feerate.h
+++ b/src/policy/feerate.h
@@ -39,7 +39,16 @@ public:
// We've previously had bugs creep in from silent double->int conversion...
static_assert(std::is_integral<I>::value, "CFeeRate should be used without floats");
}
- /** Constructor for a fee rate in satoshis per kB. The size in bytes must not exceed (2^63 - 1)*/
+ /** Constructor for a fee rate in satoshis per kvB (sat/kvB). The size in bytes must not exceed (2^63 - 1).
+ *
+ * Passing an nBytes value of COIN (1e8) returns a fee rate in satoshis per vB (sat/vB),
+ * e.g. (nFeePaid * 1e8 / 1e3) == (nFeePaid / 1e5),
+ * where 1e5 is the ratio to convert from BTC/kvB to sat/vB.
+ *
+ * @param[in] nFeePaid CAmount fee rate to construct with
+ * @param[in] nBytes size_t bytes (units) to construct with
+ * @returns fee rate
+ */
CFeeRate(const CAmount& nFeePaid, size_t nBytes);
/**
* Return the fee in satoshis for the given size in bytes.