diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-05-24 21:59:54 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-07-08 11:18:35 -0300 |
commit | 111ea3ab711414236f8678566a7884d48619b2d8 (patch) | |
tree | 5d4fa02e5aeb208d51f268dec3e6bcf1350e0a98 /src/bench/wallet_loading.cpp | |
parent | 22351725bc4c5eb63ee45f607374bbf2d76e2b8c (diff) | |
download | bitcoin-111ea3ab711414236f8678566a7884d48619b2d8.tar.xz |
wallet: refactor GetNewDestination, use BResult
Diffstat (limited to 'src/bench/wallet_loading.cpp')
-rw-r--r-- | src/bench/wallet_loading.cpp | 7 |
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{}); |