diff --git a/src/Makefile.am b/src/Makefile.am index ee06219eb..a1a47f839 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -176,6 +176,9 @@ BITCOIN_CORE_H = \ zmq/zmqnotificationinterface.h \ zmq/zmqpublishnotifier.h +BITCOIN_CORE_H += \ + keva/main.h \ + keva/common.h obj/build.h: FORCE @$(MKDIR_P) $(builddir)/obj @@ -225,6 +228,7 @@ libbitcoin_server_a_SOURCES = \ validation.cpp \ validationinterface.cpp \ versionbits.cpp \ + keva/main.cpp \ $(BITCOIN_CORE_H) if ENABLE_ZMQ @@ -254,6 +258,9 @@ libbitcoin_wallet_a_SOURCES = \ wallet/walletutil.cpp \ $(BITCOIN_CORE_H) +libbitcoin_wallet_a_SOURCES += \ + wallet/rpckeva.cpp + # crypto primitives library crypto_libbitcoin_crypto_a_CPPFLAGS = $(AM_CPPFLAGS) $(SSL_CFLAGS) crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) @@ -331,7 +338,9 @@ libbitcoin_consensus_a_SOURCES = \ uint256.h \ utilstrencodings.cpp \ utilstrencodings.h \ - version.h + version.h \ + script/keva.h \ + script/keva.cpp # common: shared between bitcoind, and bitcoin-qt and non-server tools libbitcoin_common_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) @@ -354,6 +363,7 @@ libbitcoin_common_a_SOURCES = \ script/sign.cpp \ script/standard.cpp \ warnings.cpp \ + keva/common.cpp \ $(BITCOIN_CORE_H) # util: shared between all executables. diff --git a/src/keva/main.h b/src/keva/main.h index 4ca3db944..9c244c118 100644 --- a/src/keva/main.h +++ b/src/keva/main.h @@ -58,7 +58,7 @@ private: bool isNew; /** The old name value that was overwritten by the operation. */ - CNameData oldData; + CKevaData oldData; public: @@ -137,8 +137,8 @@ public: * Construct with reference to parent mempool. * @param p The parent pool. */ - explicit inline CNameMemPool (CTxMemPool& p) - : pool(p), mapNamespaceRegs(), mapKeyRegs(), mapNameUpdates() + explicit inline CKevaMemPool (CTxMemPool& p) + : pool(p), mapNamespaceRegs() {} /** @@ -149,9 +149,9 @@ public: * @return True iff there's a matching namespace registration in the pool. */ inline bool - registersNamespace (const valtype& namespace) const + registersNamespace (const valtype& nameSpace) const { - return mapNamespaceRegs.count (name) > 0; + return mapNamespaceRegs.count(nameSpace) > 0; } /** @@ -162,7 +162,8 @@ public: inline bool updatesName (const valtype& name) const { - return mapNameUpdates.count (name) > 0; + //return mapNameUpdates.count (name) > 0; + return true; } /** @@ -179,9 +180,11 @@ public: inline void clear () { + /* mapNameRegs.clear (); mapNameUpdates.clear (); mapNameNews.clear (); + */ } /** diff --git a/src/script/keva.h b/src/script/keva.h index a66466e83..0a6be3bf7 100644 --- a/src/script/keva.h +++ b/src/script/keva.h @@ -152,29 +152,6 @@ public: } } - /** - * Return the name operation's rand value. This is only valid - * for OP_NAME_FIRSTUPDATE. - * @return The name operation's rand. - */ - inline const valtype& getOpRand() const - { - assert (op == OP_NAME_FIRSTUPDATE); - return args[1]; - } - - /** - * Return the name operation's hash value. This is only valid - * for OP_NAME_NEW. - * @return The name operation's hash. - */ - inline const valtype& - getOpHash () const - { - assert (op == OP_NAME_NEW); - return args[0]; - } - /** * Check if the given script is a name script. This is a utility method. * @param script The script to parse.