aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-11-06 21:31:14 +0200
committerRiccardo Spagni <ric@spagni.net>2018-11-06 21:31:14 +0200
commit299d75b20979808dc10f0338eb49503ebbaf3220 (patch)
tree3eef77b5ba582fa0b3749cd067d7535daffa0c2f
parentMerge pull request #4733 (diff)
parentrpc: adjust ring size error message now that too high is also possible (diff)
downloadmonero-299d75b20979808dc10f0338eb49503ebbaf3220.tar.xz
Merge pull request #4735
73e504c1 rpc: adjust ring size error message now that too high is also possible (moneromooo-monero) a5ca7f4f core: fix unmixable special case allowing ring size below 11 (moneromooo-monero)
-rw-r--r--src/cryptonote_core/blockchain.cpp2
-rw-r--r--src/rpc/core_rpc_server.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 77b6d0b69..e908c2012 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -2530,7 +2530,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc,
}
}
- if (hf_version >= HF_VERSION_MIN_MIXIN_10 && mixin != 10)
+ if (((hf_version == HF_VERSION_MIN_MIXIN_10 || hf_version == HF_VERSION_MIN_MIXIN_10+1) && mixin != 10) || (hf_version >= HF_VERSION_MIN_MIXIN_10+2 && mixin > 10))
{
MERROR_VER("Tx " << get_transaction_hash(tx) << " has invalid ring size (" << (mixin + 1) << "), it should be 11");
tvc.m_low_mixin = true;
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index 574f6c126..6c1972a3f 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -701,7 +701,7 @@ namespace cryptonote
res.status = "Failed";
res.reason = "";
if ((res.low_mixin = tvc.m_low_mixin))
- add_reason(res.reason, "ring size too small");
+ add_reason(res.reason, "bad ring size");
if ((res.double_spend = tvc.m_double_spend))
add_reason(res.reason, "double spend");
if ((res.invalid_input = tvc.m_invalid_input))