diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-04-08 16:43:10 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-07-08 11:18:35 -0300 |
commit | 22351725bc4c5eb63ee45f607374bbf2d76e2b8c (patch) | |
tree | f070e528309494f0f519be8fd590117c00f1761b /src/wallet/spend.h | |
parent | 198fcca162f4d2f877feab485e629ff89818ff56 (diff) | |
download | bitcoin-22351725bc4c5eb63ee45f607374bbf2d76e2b8c.tar.xz |
send: refactor CreateTransaction flow to return a BResult<CTransactionRef>
Diffstat (limited to 'src/wallet/spend.h')
-rw-r--r-- | src/wallet/spend.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h index ecf9b695ee..e9078bd792 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -7,6 +7,7 @@ #include <consensus/amount.h> #include <policy/fees.h> // for FeeCalculation +#include <util/result.h> #include <wallet/coinselection.h> #include <wallet/transaction.h> #include <wallet/wallet.h> @@ -120,7 +121,7 @@ struct CreatedTransactionResult * selected by SelectCoins(); Also create the change output, when needed * @note passing change_pos as -1 will result in setting a random position */ -std::optional<CreatedTransactionResult> CreateTransaction(CWallet& wallet, const std::vector<CRecipient>& vecSend, int change_pos, bilingual_str& error, const CCoinControl& coin_control, bool sign = true); +BResult<CreatedTransactionResult> CreateTransaction(CWallet& wallet, const std::vector<CRecipient>& vecSend, int change_pos, const CCoinControl& coin_control, bool sign = true); /** * Insert additional inputs into the transaction by |