diff --git a/src/wallet/txassembler.cpp b/src/wallet/txassembler.cpp index e5b6fc3ee..a587486ff 100644 --- a/src/wallet/txassembler.cpp +++ b/src/wallet/txassembler.cpp @@ -1,5 +1,6 @@ #include +#include #include #include #include @@ -58,6 +59,11 @@ AssembledTx TxAssembler::CreateTransaction( throw CreateTxError(_("Transaction too large")); } + TxValidationState validation_state; + if (!CheckTransaction(*tx, validation_state)) { + throw CreateTxError(_("Transaction is invalid")); + } + if (new_tx.total_fee > m_wallet.m_default_max_tx_fee) { throw CreateTxError(TransactionErrorString(TransactionError::MAX_FEE_EXCEEDED)); }