1
0
Fork 0
forked from lthn/blockchain

fixed wallet2::finalize_transaction() to correctly handle too big txs (and not to pass them to the daemon)

This commit is contained in:
sowle 2024-07-02 17:22:07 +02:00
parent 2b9caf2cb3
commit 9150c31666
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -7605,7 +7605,8 @@ void wallet2::finalize_transaction(currency::finalize_tx_param& ftp, currency::f
}
//TIME_MEASURE_FINISH_MS(sign_ms_input_time);
THROW_IF_FALSE_WALLET_EX(get_object_blobsize(result.tx) < CURRENCY_MAX_TRANSACTION_BLOB_SIZE, error::tx_too_big, result.tx, m_upper_transaction_size_limit);
size_t tx_blob_size = tx_to_blob(result.tx).size();
THROW_IF_FALSE_WALLET_EX(tx_blob_size < CURRENCY_MAX_TRANSACTION_BLOB_SIZE, error::tx_too_big, result.tx, m_upper_transaction_size_limit);
if (store_tx_secret_key)
m_tx_keys.insert(std::make_pair(get_transaction_hash(result.tx), result.one_time_key));