1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Add mempool messages cap

This commit is contained in:
OmicronTau 2021-11-13 17:15:19 +03:00 committed by EmelyanenkoK
parent 678a8a6a13
commit 69d0472510
7 changed files with 31 additions and 2 deletions

View file

@ -366,6 +366,9 @@ void ValidatorManagerImpl::new_external_message(td::BufferSlice data) {
if (!is_validator()) {
return;
}
if( ext_messages_.size() > max_mempool_num() ) {
return;
}
auto R = create_ext_message(std::move(data));
if (R.is_error()) {
VLOG(VALIDATOR_NOTICE) << "dropping bad ihr message: " << R.move_as_error();