aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorGregory Sanders <gsanders87@gmail.com>2021-05-24 18:58:49 +0800
committerGregory Sanders <gsanders87@gmail.com>2021-05-26 07:33:09 +0800
commit881a3e2e17c5a6fdffb16a47a2eaff9029f261e5 (patch)
tree82294829f03ca21d696be6585cf7a77adc577263 /src/wallet/wallet.h
parent3ad1b8899bfbf87ca4f06c20e8285bc8be31bbe8 (diff)
downloadbitcoin-881a3e2e17c5a6fdffb16a47a2eaff9029f261e5.tar.xz
Replace size/weight estimate tuple with struct for named fields
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 5f48e77590..9a572bc610 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -1346,12 +1346,17 @@ public:
}
};
+struct TxSize {
+ int64_t vsize{-1};
+ int64_t weight{-1};
+};
+
/** Calculate the size of the transaction assuming all signatures are max size
* Use DummySignatureCreator, which inserts 71 byte signatures everywhere.
* NOTE: this requires that all inputs must be in mapWallet (eg the tx should
* be IsAllFromMe). */
-std::pair<int64_t, int64_t> CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wallet, bool use_max_sig = false) EXCLUSIVE_LOCKS_REQUIRED(wallet->cs_wallet);
-std::pair<int64_t, int64_t> CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wallet, const std::vector<CTxOut>& txouts, bool use_max_sig = false);
+TxSize CalculateMaximumSignedTxSize(const CTransaction& tx, const CWallet* wallet, bool use_max_sig = false) EXCLUSIVE_LOCKS_REQUIRED(wallet->cs_wallet);
+TxSize CalculateMaximumSignedTxSize(const CTransaction& tx, const CWallet* wallet, const std::vector<CTxOut>& txouts, bool use_max_sig = false);
//! Add wallet name to persistent configuration so it will be loaded on startup.
bool AddWalletSetting(interfaces::Chain& chain, const std::string& wallet_name);