Fixed keva_namespace transaction propagation.

Now it crashed maybe when connecting block.
This commit is contained in:
Jianping Wu 2018-10-30 20:57:02 -07:00
parent 2ba7b82896
commit d341a86c09
2 changed files with 8 additions and 1 deletions

View File

@ -397,6 +397,13 @@ CheckKevaTransaction (const CTransaction& tx, unsigned nHeight,
name input that is being updated. */
#endif
if (nameOpOut.isNamespaceRegistration()) {
if (nameOpOut.getOpNamespaceDisplayName().size () > MAX_VALUE_LENGTH) {
return state.Invalid (error ("CheckNameTransaction: display name value too long"));
}
return true;
}
assert (nameOpOut.isAnyUpdate());
if (nameIn == -1) {
return state.Invalid(error("CheckNameTransaction: update without"

View File

@ -81,7 +81,7 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType, const bool w
bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnessEnabled)
{
if (tx.nVersion > CTransaction::MAX_STANDARD_VERSION || tx.nVersion < 1) {
if (!tx.IsKevacoin() && (tx.nVersion > CTransaction::MAX_STANDARD_VERSION || tx.nVersion < 1)) {
reason = "version";
return false;
}