From 79f7a059608f2180a9469b0a3db75d1780251e2a Mon Sep 17 00:00:00 2001 From: levonpetrosyan93 Date: Mon, 22 Jan 2024 01:43:42 +0400 Subject: [PATCH] Fix bug creating large spark spend tx --- src/spark/sparkwallet.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/spark/sparkwallet.cpp b/src/spark/sparkwallet.cpp index 69502c8c18..822aafdaff 100644 --- a/src/spark/sparkwallet.cpp +++ b/src/spark/sparkwallet.cpp @@ -1525,9 +1525,6 @@ CWalletTx CSparkWallet::CreateSparkSpendTransaction( i++; } - // check fee - wtxNew.SetTx(MakeTransactionRef(std::move(tx))); - if (GetTransactionWeight(tx) >= MAX_NEW_TX_WEIGHT) { throw std::runtime_error(_("Transaction too large")); } @@ -1546,6 +1543,8 @@ CWalletTx CSparkWallet::CreateSparkSpendTransaction( throw std::invalid_argument(_("Not enough fee estimated")); } + wtxNew.SetTx(MakeTransactionRef(std::move(tx))); + result.push_back(wtxNew); } }