aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-02-22 11:44:42 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-02-22 11:45:32 +0000
commitb674728dfa12f26a508713e31ce8e53c1445f040 (patch)
treedd92afd9bd8221c329fcb713ca798271c69d6770 /src/wallet/wallet2.cpp
parentMerge pull request #4988 (diff)
downloadmonero-b674728dfa12f26a508713e31ce8e53c1445f040.tar.xz
Better error when sending a tx with a too large extra field
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r--src/wallet/wallet2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index c02d10ab4..af8dbb16d 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -9096,6 +9096,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
{
const size_t estimated_rct_tx_weight = estimate_tx_weight(use_rct, tx.selected_transfers.size(), fake_outs_count, tx.dsts.size()+1, extra.size(), bulletproof);
try_tx = dsts.empty() || (estimated_rct_tx_weight >= TX_WEIGHT_TARGET(upper_transaction_weight_limit));
+ THROW_WALLET_EXCEPTION_IF(try_tx && tx.dsts.empty(), error::tx_too_big, estimated_rct_tx_weight, upper_transaction_weight_limit);
}
}