aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/coincontrol.h
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2023-01-23 16:59:25 -0500
committerAndrew Chow <github@achow101.com>2023-12-08 14:55:14 -0500
commit5321786b9d90eaf35059bb07e6beaaa2cbb257ac (patch)
treef7e73d72fb1df3c59ae2383c5bbdddc2ed1d4eca /src/wallet/coincontrol.h
parente1abfb5b2037ca4fe5a05aa578030c8016491c8b (diff)
downloadbitcoin-5321786b9d90eaf35059bb07e6beaaa2cbb257ac.tar.xz
coincontrol: Replace HasInputWeight with returning optional from Get
Diffstat (limited to 'src/wallet/coincontrol.h')
-rw-r--r--src/wallet/coincontrol.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h
index 4f87d13d99..1d1f5c4da2 100644
--- a/src/wallet/coincontrol.h
+++ b/src/wallet/coincontrol.h
@@ -46,9 +46,7 @@ public:
/** Set the weight for this input. */
void SetInputWeight(int64_t weight);
/** Retrieve the input weight for this input. */
- int64_t GetInputWeight() const;
- /** Return whether the input weight is set. */
- bool HasInputWeight() const;
+ std::optional<int64_t> GetInputWeight() const;
};
/** Coin Control Features. */
@@ -132,13 +130,9 @@ public:
*/
void SetInputWeight(const COutPoint& outpoint, int64_t weight);
/**
- * Returns true if the input weight is set.
- */
- bool HasInputWeight(const COutPoint& outpoint) const;
- /**
* Returns the input weight.
*/
- int64_t GetInputWeight(const COutPoint& outpoint) const;
+ std::optional<int64_t> GetInputWeight(const COutPoint& outpoint) const;
private:
//! Selected inputs (inputs that will be used, regardless of whether they're optimal or not)