From b386ae57251216fd01b16b1222b9cb4acadae68f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 23 Apr 2019 21:53:39 +0000 Subject: [PATCH 1/2] wallet2: add missing "sanity check failed" reason message --- src/wallet/wallet2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 831166d5f..79dae083f 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -221,6 +221,8 @@ namespace add_reason(reason, "fee too low"); if (res.not_rct) add_reason(reason, "tx is not ringct"); + if (res.sanity_check_failed) + add_reason(reason, "tx sanity check failed"); if (res.not_relayed) add_reason(reason, "tx was not relayed"); return reason; From 4be18df32acf2ff214e4734866cc74947436a1f0 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 23 Apr 2019 21:56:48 +0000 Subject: [PATCH 2/2] tx_sanity_check: relax uniqueness check a bit It triggers easily on testnet --- src/cryptonote_core/tx_sanity_check.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cryptonote_core/tx_sanity_check.cpp b/src/cryptonote_core/tx_sanity_check.cpp index d3b225f1c..10198a3d3 100644 --- a/src/cryptonote_core/tx_sanity_check.cpp +++ b/src/cryptonote_core/tx_sanity_check.cpp @@ -34,7 +34,7 @@ #include "tx_sanity_check.h" #undef MONERO_DEFAULT_LOG_CATEGORY -#define MONERO_DEFAULT_LOG_CATEGORY "txsanity" +#define MONERO_DEFAULT_LOG_CATEGORY "verify" namespace cryptonote { @@ -80,7 +80,7 @@ bool tx_sanity_check(Blockchain &blockchain, const cryptonote::blobdata &tx_blob if (n_available < 10000) return true; - if (rct_indices.size() < n_indices * 9 / 10) + if (rct_indices.size() < n_indices * 8 / 10) { MERROR("unique indices is only " << rct_indices.size() << "/" << n_indices); return false;