aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
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{});