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. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/policy/feerate.h
CHANGED
|
@@ -65,9 +65,13 @@ public:
|
|
| 65 |
friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
|
| 66 |
friend bool operator!=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK != b.nSatoshisPerK; }
|
| 67 |
CFeeRate& operator+=(const CFeeRate& a) { nSatoshisPerK += a.nSatoshisPerK; return *this; }
|
|
|
|
| 68 |
std::string ToString(const FeeEstimateMode& fee_estimate_mode = FeeEstimateMode::BTC_KVB) const;
|
|
|
|
|
|
|
| 69 |
friend CFeeRate operator*(const CFeeRate& f, int a) { return CFeeRate(a * f.nSatoshisPerK); }
|
| 70 |
friend CFeeRate operator*(int a, const CFeeRate& f) { return CFeeRate(a * f.nSatoshisPerK); }
|
|
|
|
| 71 |
|
| 72 |
SERIALIZE_METHODS(CFeeRate, obj) { READWRITE(obj.nSatoshisPerK); }
|
| 73 |
};
|
|
|
|
| 65 |
friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
|
| 66 |
friend bool operator!=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK != b.nSatoshisPerK; }
|
| 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. */
|
| 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;
|
| 72 |
friend CFeeRate operator*(const CFeeRate& f, int a) { return CFeeRate(a * f.nSatoshisPerK); }
|
| 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); }
|
| 75 |
|
| 76 |
SERIALIZE_METHODS(CFeeRate, obj) { READWRITE(obj.nSatoshisPerK); }
|
| 77 |
};
|