From 53b8f79ebcbb95d56c4b0adb6af3e430ac6b1e67 Mon Sep 17 00:00:00 2001
From: librelois <c@elo.tf>
Date: Fri, 13 Nov 2020 22:07:47 +0100
Subject: [PATCH] [fix] mempools: add_pending_tx: error in control condition

---
 rust-libs/duniter-mempools/src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust-libs/duniter-mempools/src/lib.rs b/rust-libs/duniter-mempools/src/lib.rs
index a4528f80f..c132ff116 100644
--- a/rust-libs/duniter-mempools/src/lib.rs
+++ b/rust-libs/duniter-mempools/src/lib.rs
@@ -93,7 +93,7 @@ impl TxsMempool {
         } else {
             duniter_dbs_write_ops::txs_mp::add_pending_tx(
                 |_tx, txs| {
-                    if txs.count()? < self.max_size {
+                    if txs.count()? >= self.max_size {
                         Err(KvError::Custom(TxMpError::Full.into()))
                     } else {
                         Ok(())
-- 
GitLab