Browse Source

Fixed keva_namespace transaction propagation.

Now it crashed maybe when connecting block.
cn
Jianping Wu 6 years ago
parent
commit
d341a86c09
  1. 7
      src/keva/main.cpp
  2. 2
      src/policy/policy.cpp

7
src/keva/main.cpp

@ -397,6 +397,13 @@ CheckKevaTransaction (const CTransaction& tx, unsigned nHeight,
name input that is being updated. */ name input that is being updated. */
#endif #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()); assert (nameOpOut.isAnyUpdate());
if (nameIn == -1) { if (nameIn == -1) {
return state.Invalid(error("CheckNameTransaction: update without" return state.Invalid(error("CheckNameTransaction: update without"

2
src/policy/policy.cpp

@ -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) 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"; reason = "version";
return false; return false;
} }

Loading…
Cancel
Save