Remove mention of joinsplit from some error messages
This commit is contained in:
@@ -545,7 +545,7 @@ public:
|
|||||||
size_t DynamicMemoryUsage() const;
|
size_t DynamicMemoryUsage() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount of bitcoins coming in to a transaction
|
* Amount of HUSH coming in to a transaction
|
||||||
* Note that lightweight clients may not know anything besides the hash of previous transactions,
|
* Note that lightweight clients may not know anything besides the hash of previous transactions,
|
||||||
* so may not be able to calculate this.
|
* so may not be able to calculate this.
|
||||||
*
|
*
|
||||||
@@ -557,7 +557,7 @@ public:
|
|||||||
//! Check whether all prevouts of the transaction are present in the UTXO set represented by this view
|
//! Check whether all prevouts of the transaction are present in the UTXO set represented by this view
|
||||||
bool HaveInputs(const CTransaction& tx) const;
|
bool HaveInputs(const CTransaction& tx) const;
|
||||||
|
|
||||||
//! Check whether all joinsplit requirements (anchors/nullifiers) are satisfied
|
//! Check whether all shielded requirements (anchors/nullifiers) are satisfied
|
||||||
bool HaveShieldedRequirements(const CTransaction& tx) const;
|
bool HaveShieldedRequirements(const CTransaction& tx) const;
|
||||||
|
|
||||||
//! Return priority of tx at height nHeight
|
//! Return priority of tx at height nHeight
|
||||||
|
|||||||
15
src/main.cpp
15
src/main.cpp
@@ -1907,7 +1907,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|||||||
if (!view.HaveShieldedRequirements(tx))
|
if (!view.HaveShieldedRequirements(tx))
|
||||||
{
|
{
|
||||||
//fprintf(stderr,"accept failure.2\n");
|
//fprintf(stderr,"accept failure.2\n");
|
||||||
return state.Invalid(error("AcceptToMemoryPool: joinsplit requirements not met"),REJECT_DUPLICATE, "bad-txns-joinsplit-requirements-not-met");
|
return state.Invalid(error("AcceptToMemoryPool: shielded requirements not met"),REJECT_DUPLICATE, "bad-txns-joinsplit-requirements-not-met");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bring the best block into scope
|
// Bring the best block into scope
|
||||||
@@ -2728,9 +2728,9 @@ namespace Consensus {
|
|||||||
if (!inputs.HaveInputs(tx))
|
if (!inputs.HaveInputs(tx))
|
||||||
return state.Invalid(error("CheckInputs(): %s inputs unavailable", tx.GetHash().ToString()));
|
return state.Invalid(error("CheckInputs(): %s inputs unavailable", tx.GetHash().ToString()));
|
||||||
|
|
||||||
// are the JoinSplit's requirements met?
|
// are the shielded requirements met?
|
||||||
if (!inputs.HaveShieldedRequirements(tx))
|
if (!inputs.HaveShieldedRequirements(tx))
|
||||||
return state.Invalid(error("CheckInputs(): %s JoinSplit requirements not met", tx.GetHash().ToString()));
|
return state.Invalid(error("CheckInputs(): %s shielded requirements not met", tx.GetHash().ToString()));
|
||||||
|
|
||||||
CAmount nValueIn = 0;
|
CAmount nValueIn = 0;
|
||||||
CAmount nFees = 0;
|
CAmount nFees = 0;
|
||||||
@@ -3464,7 +3464,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|||||||
// Before the genesis block, there was an empty tree
|
// Before the genesis block, there was an empty tree
|
||||||
SproutMerkleTree tree;
|
SproutMerkleTree tree;
|
||||||
pindex->hashSproutAnchor = tree.root();
|
pindex->hashSproutAnchor = tree.root();
|
||||||
// The genesis block contained no JoinSplits
|
// The genesis block contained no JoinSplits, lulz
|
||||||
pindex->hashFinalSproutRoot = pindex->hashSproutAnchor;
|
pindex->hashFinalSproutRoot = pindex->hashSproutAnchor;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -3557,10 +3557,9 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
|
|||||||
return state.DoS(100, error("ConnectBlock(): inputs missing/spent"),
|
return state.DoS(100, error("ConnectBlock(): inputs missing/spent"),
|
||||||
REJECT_INVALID, "bad-txns-inputs-missingorspent");
|
REJECT_INVALID, "bad-txns-inputs-missingorspent");
|
||||||
}
|
}
|
||||||
// are the JoinSplit's requirements met?
|
// are the shielded requirements met?
|
||||||
if (!view.HaveShieldedRequirements(tx))
|
if (!view.HaveShieldedRequirements(tx))
|
||||||
return state.DoS(100, error("ConnectBlock(): JoinSplit requirements not met"),
|
return state.DoS(100, error("ConnectBlock(): shielded requirements not met"), REJECT_INVALID, "bad-txns-joinsplit-requirements-not-met");
|
||||||
REJECT_INVALID, "bad-txns-joinsplit-requirements-not-met");
|
|
||||||
|
|
||||||
if (fAddressIndex || fSpentIndex)
|
if (fAddressIndex || fSpentIndex)
|
||||||
{
|
{
|
||||||
@@ -6403,7 +6402,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
|
|||||||
CBlockIndex* pindexFailure = NULL;
|
CBlockIndex* pindexFailure = NULL;
|
||||||
int nGoodTransactions = 0;
|
int nGoodTransactions = 0;
|
||||||
CValidationState state;
|
CValidationState state;
|
||||||
// No need to verify JoinSplits twice
|
// No need to verify shielded req's twice
|
||||||
auto verifier = libzcash::ProofVerifier::Disabled();
|
auto verifier = libzcash::ProofVerifier::Disabled();
|
||||||
//fprintf(stderr,"start VerifyDB %u\n",(uint32_t)time(NULL));
|
//fprintf(stderr,"start VerifyDB %u\n",(uint32_t)time(NULL));
|
||||||
for (CBlockIndex* pindex = chainActive.Tip(); pindex && pindex->pprev; pindex = pindex->pprev)
|
for (CBlockIndex* pindex = chainActive.Tip(); pindex && pindex->pprev; pindex = pindex->pprev)
|
||||||
|
|||||||
Reference in New Issue
Block a user