From 7fdc84cc45bb4c864a0dd13277c02c0d1772545c Mon Sep 17 00:00:00 2001 From: Jianping Wu Date: Fri, 2 Nov 2018 17:14:42 -0700 Subject: [PATCH] Fixed getting namespace txin. --- src/keva/main.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/keva/main.cpp b/src/keva/main.cpp index 10e9f29a9..594447760 100644 --- a/src/keva/main.cpp +++ b/src/keva/main.cpp @@ -433,15 +433,8 @@ CheckKevaTransaction (const CTransaction& tx, unsigned nHeight, CKevaData oldName; const valtype& namespaceIn = nameOpIn.getOpNamespace(); - if (nameOpIn.isNamespaceRegistration()) { - if (!view.GetNamespace(namespaceIn, oldName)) { - return state.Invalid (error ("%s: KEVA_PUT name does not exist in namespace registration", __func__)); - } - } else if (nameOpIn.isAnyUpdate()) { - const valtype& keyIn = nameOpIn.getOpKey(); - if (!view.GetName(namespaceIn, keyIn, oldName)) { - return state.Invalid (error ("%s: KEVA_PUT name does not exist", __func__)); - } + if (!view.GetNamespace(namespaceIn, oldName)) { + return state.Invalid (error ("%s: Namespace not found", __func__)); } assert (tx.vin[nameIn].prevout == oldName.getUpdateOutpoint());