|
|
|
@ -7,8 +7,6 @@
@@ -7,8 +7,6 @@
|
|
|
|
|
|
|
|
|
|
#include <script/script.h> |
|
|
|
|
|
|
|
|
|
typedef std::vector<unsigned char> valtype; |
|
|
|
|
|
|
|
|
|
class uint160; |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -51,8 +49,7 @@ public:
@@ -51,8 +49,7 @@ public:
|
|
|
|
|
* Return whether this is a (valid) name script. |
|
|
|
|
* @return True iff this is a name operation. |
|
|
|
|
*/ |
|
|
|
|
inline bool |
|
|
|
|
isKevaOp () const |
|
|
|
|
inline bool isKevaOp() const |
|
|
|
|
{ |
|
|
|
|
switch (op) { |
|
|
|
|
case OP_KEVA_PUT: |
|
|
|
@ -136,16 +133,15 @@ public:
@@ -136,16 +133,15 @@ public:
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Return the name operation value. This call is only valid for |
|
|
|
|
* OP_KEVA_PUT. |
|
|
|
|
* @return The name operation's value. |
|
|
|
|
* Return namespace's display name. This call is only valid for |
|
|
|
|
* OP_KEVA_NAMESPACE. |
|
|
|
|
* @return The namespace's display name. |
|
|
|
|
*/ |
|
|
|
|
inline const valtype& getOpNamespaceValue() const |
|
|
|
|
inline const valtype& getOpNamespaceDisplayName() const |
|
|
|
|
{ |
|
|
|
|
switch (op) { |
|
|
|
|
case OP_KEVA_PUT: |
|
|
|
|
// args[1] is namespace
|
|
|
|
|
return args[2]; |
|
|
|
|
case OP_KEVA_NAMESPACE: |
|
|
|
|
return args[1]; |
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
assert (false); |
|
|
|
@ -161,10 +157,7 @@ public:
@@ -161,10 +157,7 @@ public:
|
|
|
|
|
{ |
|
|
|
|
switch (op) { |
|
|
|
|
case OP_KEVA_PUT: |
|
|
|
|
return args[0]; |
|
|
|
|
|
|
|
|
|
case OP_KEVA_NAMESPACE: |
|
|
|
|
return args[0]; |
|
|
|
|
return args[1]; |
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
assert(false); |
|
|
|
@ -180,7 +173,7 @@ public:
@@ -180,7 +173,7 @@ public:
|
|
|
|
|
{ |
|
|
|
|
switch (op) { |
|
|
|
|
case OP_KEVA_PUT: |
|
|
|
|
// args[1] is namespace
|
|
|
|
|
// args[0] is namespace, args[1] is key
|
|
|
|
|
return args[2]; |
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|