aboutsummaryrefslogtreecommitdiff
path: root/src/policy
diff options
context:
space:
mode:
authorMurch <murch@murch.one>2023-12-08 13:53:46 -0500
committerMurch <murch@murch.one>2023-12-09 09:33:45 -0500
commit1553c8078698df1058b62e8fdadaf74160977b30 (patch)
tree7c90f7466cadf128acc1d58056e26a49c3ac06bd /src/policy
parent2e8ec6b338a825a7155fff1be83993e3834ab655 (diff)
downloadbitcoin-1553c8078698df1058b62e8fdadaf74160977b30.tar.xz
Add multiplication operator to CFeeRate
Diffstat (limited to 'src/policy')
-rw-r--r--src/policy/feerate.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/policy/feerate.h b/src/policy/feerate.h
index 41f4a4d06b..2e50172914 100644
--- a/src/policy/feerate.h
+++ b/src/policy/feerate.h
@@ -71,6 +71,8 @@ public:
friend bool operator!=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK != b.nSatoshisPerK; }
CFeeRate& operator+=(const CFeeRate& a) { nSatoshisPerK += a.nSatoshisPerK; return *this; }
std::string ToString(const FeeEstimateMode& fee_estimate_mode = FeeEstimateMode::BTC_KVB) const;
+ friend CFeeRate operator*(const CFeeRate& f, int a) { return CFeeRate(a * f.nSatoshisPerK); }
+ friend CFeeRate operator*(int a, const CFeeRate& f) { return CFeeRate(a * f.nSatoshisPerK); }
SERIALIZE_METHODS(CFeeRate, obj) { READWRITE(obj.nSatoshisPerK); }
};