From 089c7637a64652c8bcf6c437065237c23266d4a9 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 4 Apr 2019 00:15:57 +0000 Subject: cryptonote: rework block blob size sanity check Use the actual block weight limit, assuming that weight is always greater or equal to size --- src/cryptonote_basic/cryptonote_basic.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cryptonote_basic/cryptonote_basic.h') diff --git a/src/cryptonote_basic/cryptonote_basic.h b/src/cryptonote_basic/cryptonote_basic.h index 03caafbb0..20d92bdf1 100644 --- a/src/cryptonote_basic/cryptonote_basic.h +++ b/src/cryptonote_basic/cryptonote_basic.h @@ -422,6 +422,8 @@ namespace cryptonote FIELDS(*static_cast(this)) FIELD(miner_tx) FIELD(tx_hashes) + if (tx_hashes.size() > CRYPTONOTE_MAX_TX_PER_BLOCK) + return false; END_SERIALIZE() }; -- cgit v1.2.3