aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-05-24 21:59:54 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2022-07-08 11:18:35 -0300
commit111ea3ab711414236f8678566a7884d48619b2d8 (patch)
tree5d4fa02e5aeb208d51f268dec3e6bcf1350e0a98 /src/bench
parent22351725bc4c5eb63ee45f607374bbf2d76e2b8c (diff)
downloadbitcoin-111ea3ab711414236f8678566a7884d48619b2d8.tar.xz
wallet: refactor GetNewDestination, use BResult
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/wallet_loading.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bench/wallet_loading.cpp b/src/bench/wallet_loading.cpp
index f611383788..d258d7a29e 100644
--- a/src/bench/wallet_loading.cpp
+++ b/src/bench/wallet_loading.cpp
@@ -47,12 +47,11 @@ static void BenchUnloadWallet(std::shared_ptr<CWallet>&& wallet)
static void AddTx(CWallet& wallet)
{
- bilingual_str error;
- CTxDestination dest;
- wallet.GetNewDestination(OutputType::BECH32, "", dest, error);
+ const auto& dest = wallet.GetNewDestination(OutputType::BECH32, "");
+ assert(dest.HasRes());
CMutableTransaction mtx;
- mtx.vout.push_back({COIN, GetScriptForDestination(dest)});
+ mtx.vout.push_back({COIN, GetScriptForDestination(dest.GetObj())});
mtx.vin.push_back(CTxIn());
wallet.AddToWallet(MakeTransactionRef(mtx), TxStateInactive{});