diff --git a/rai/node/bootstrap.cpp b/rai/node/bootstrap.cpp index b6d6316c..86a82371 100644 --- a/rai/node/bootstrap.cpp +++ b/rai/node/bootstrap.cpp @@ -2010,6 +2010,17 @@ std::pair, std::unique_ptr> { if (deduplication.count (info.source) != 0) { + /* + * If the deduplication map gets too + * large, clear it out. This may + * result in some duplicates getting + * sent to the client, but we do not + * want to commit too much memory + */ + if (deduplication.size () > 4096) + { + deduplication.clear (); + } continue; }