mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 03:59:33 +00:00
Merge pull request #5486
4be18df3
tx_sanity_check: relax uniqueness check a bit (moneromooo-monero)b386ae57
wallet2: add missing "sanity check failed" reason message (moneromooo-monero)
This commit is contained in:
commit
581994b61c
2 changed files with 4 additions and 2 deletions
|
@ -34,7 +34,7 @@
|
||||||
#include "tx_sanity_check.h"
|
#include "tx_sanity_check.h"
|
||||||
|
|
||||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||||
#define MONERO_DEFAULT_LOG_CATEGORY "txsanity"
|
#define MONERO_DEFAULT_LOG_CATEGORY "verify"
|
||||||
|
|
||||||
namespace cryptonote
|
namespace cryptonote
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ bool tx_sanity_check(Blockchain &blockchain, const cryptonote::blobdata &tx_blob
|
||||||
if (n_available < 10000)
|
if (n_available < 10000)
|
||||||
return true;
|
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);
|
MERROR("unique indices is only " << rct_indices.size() << "/" << n_indices);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -221,6 +221,8 @@ namespace
|
||||||
add_reason(reason, "fee too low");
|
add_reason(reason, "fee too low");
|
||||||
if (res.not_rct)
|
if (res.not_rct)
|
||||||
add_reason(reason, "tx is not ringct");
|
add_reason(reason, "tx is not ringct");
|
||||||
|
if (res.sanity_check_failed)
|
||||||
|
add_reason(reason, "tx sanity check failed");
|
||||||
if (res.not_relayed)
|
if (res.not_relayed)
|
||||||
add_reason(reason, "tx was not relayed");
|
add_reason(reason, "tx was not relayed");
|
||||||
return reason;
|
return reason;
|
||||||
|
|
Loading…
Reference in a new issue