v29.4-roots.1 · Commit 3: [PATCH 03/13] policy: restore conservative relay and network controls
src/policy/feerate.h
Before: src/policy/feerate.h · After: src/policy/feerate.h
File metadata
index 6bcb5ddf5b6fa0192a1b6c6345c87903b6721138..a218b716a9520bf2c33d105342b2ee9794d1d115 100644
Download original patch · Release notes
Diff rows 1–13 of 13. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.
src/policy/feerate.h
CHANGED
|
@@ -65,9 +65,13 @@ public:
|
|
|
65
65
|
friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
|
|
66
66
|
friend bool operator!=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK != b.nSatoshisPerK; }
|
|
67
67
|
CFeeRate& operator+=(const CFeeRate& a) { nSatoshisPerK += a.nSatoshisPerK; return *this; }
|
|
68
|
+
/** Return the fee rate in sat/vB or BTC/kvB, with units, as a string. */
|
|
68
69
|
std::string ToString(const FeeEstimateMode& fee_estimate_mode = FeeEstimateMode::BTC_KVB) const;
|
|
70
|
+
/** Return the fee rate in sat/vB, without units, as a string. */
|
|
71
|
+
std::string SatsToString() const;
|
|
69
72
|
friend CFeeRate operator*(const CFeeRate& f, int a) { return CFeeRate(a * f.nSatoshisPerK); }
|
|
70
73
|
friend CFeeRate operator*(int a, const CFeeRate& f) { return CFeeRate(a * f.nSatoshisPerK); }
|
|
74
|
+
friend CFeeRate operator/(const CFeeRate& f, int a) { return CFeeRate(f.nSatoshisPerK / a); }
|
|
71
75
|
|
|
72
76
|
SERIALIZE_METHODS(CFeeRate, obj) { READWRITE(obj.nSatoshisPerK); }
|
|
73
77
|
};
|