Commit 9594b379 authored by Pierre Kim's avatar Pierre Kim

Adjust max tx size to avoid stale transactions

parent e76ca883
......@@ -371,9 +371,11 @@ bool Blockchain::haveSpentKeyImages(const CryptoNote::Transaction& tx) {
* \pre m_blockchain_lock is locked
*/
bool Blockchain::checkTransactionSize(size_t blobSize) {
if (blobSize > getCurrentCumulativeBlocksizeLimit() - m_currency.minerTxBlobReservedSize()) {
uint64_t TransactionSizeLimit = (getCurrentCumulativeBlocksizeLimit() / 2) - m_currency.minerTxBlobReservedSize();
if (blobSize > TransactionSizeLimit) {
logger(ERROR) << "transaction is too big " << blobSize << ", maximum allowed size is " <<
(getCurrentCumulativeBlocksizeLimit() - m_currency.minerTxBlobReservedSize());
(TransactionSizeLimit);
return false;
}
......
#define BUILD_COMMIT_ID "@VERSION@"
#define PROJECT_VERSION "1.2.1"
#define PROJECT_VERSION_BUILD_NO "0"
#define PROJECT_VERSION_BUILD_NO "1"
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment