Skip to content

Commit 6112cf2

Browse files
committed
wallet: add CFeeRate ctor doxygen documentation
as requested by reviewers
1 parent 3f72791 commit 6112cf2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/policy/feerate.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ class CFeeRate
3939
// We've previously had bugs creep in from silent double->int conversion...
4040
static_assert(std::is_integral<I>::value, "CFeeRate should be used without floats");
4141
}
42-
/** Constructor for a fee rate in satoshis per kB. The size in bytes must not exceed (2^63 - 1)*/
42+
/** Constructor for a fee rate in satoshis per kvB (sat/kvB). The size in bytes must not exceed (2^63 - 1).
43+
*
44+
* Passing an nBytes value of COIN (1e8) returns a fee rate in satoshis per vB (sat/vB),
45+
* e.g. (nFeePaid * 1e8 / 1e3) == (nFeePaid / 1e5),
46+
* where 1e5 is the ratio to convert from BTC/kvB to sat/vB.
47+
*
48+
* @param[in] nFeePaid CAmount fee rate to construct with
49+
* @param[in] nBytes size_t bytes (units) to construct with
50+
* @returns fee rate
51+
*/
4352
CFeeRate(const CAmount& nFeePaid, size_t nBytes);
4453
/**
4554
* Return the fee in satoshis for the given size in bytes.

0 commit comments

Comments
 (0)