From 8f04c9a243e8356bf9eda0774b0b98f3cd005dcc Mon Sep 17 00:00:00 2001 From: Marek Date: Thu, 28 Oct 2021 22:09:05 +0200 Subject: [PATCH] Refactor the mempool error docs (#2963) * Change the error messages * Refactor the error messages Co-authored-by: teor Co-authored-by: teor Co-authored-by: Alfredo Garcia --- zebrad/src/components/mempool/error.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/zebrad/src/components/mempool/error.rs b/zebrad/src/components/mempool/error.rs index 36d2ba1e..c70ca56c 100644 --- a/zebrad/src/components/mempool/error.rs +++ b/zebrad/src/components/mempool/error.rs @@ -23,7 +23,7 @@ pub enum MempoolError { /// /// Note that the mempool caches this error. See [`super::storage::Storage`] /// for more details. - #[error("mempool storage has a cached tip rejection for this exact transaction")] + #[error("the transaction will be rejected from the mempool until the next chain tip block")] StorageExactTip(#[from] ExactTipRejectionError), /// Transaction rejected based on its effects (spends, outputs, transaction @@ -33,9 +33,7 @@ pub enum MempoolError { /// /// Note that the mempool caches this error. See [`super::storage::Storage`] /// for more details. - #[error( - "mempool storage has a cached tip rejection for any transaction with the same effects" - )] + #[error("any transaction with the same effects will be rejected from the mempool until the next chain tip block")] StorageEffectsTip(#[from] SameEffectsTipRejectionError), /// Transaction rejected based on its effects (spends, outputs, transaction @@ -46,9 +44,7 @@ pub enum MempoolError { /// /// Note that the mempool caches this error. See [`super::storage::Storage`] /// for more details. - #[error( - "mempool storage has a cached chain rejection for any transaction with the same effects" - )] + #[error("any transaction with the same effects will be rejected from the mempool until a chain reset")] StorageEffectsChain(#[from] SameEffectsChainRejectionError), /// Transaction rejected because the mempool already contains another