|
|
@ -11,8 +11,9 @@ CKevaScript::CKevaScript (const CScript& script) |
|
|
|
{ |
|
|
|
{ |
|
|
|
opcodetype nameOp; |
|
|
|
opcodetype nameOp; |
|
|
|
CScript::const_iterator pc = script.begin(); |
|
|
|
CScript::const_iterator pc = script.begin(); |
|
|
|
if (!script.GetOp (pc, nameOp)) |
|
|
|
if (!script.GetOp(pc, nameOp)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
opcodetype opcode; |
|
|
|
opcodetype opcode; |
|
|
|
while (true) { |
|
|
|
while (true) { |
|
|
@ -33,9 +34,10 @@ CKevaScript::CKevaScript (const CScript& script) |
|
|
|
|
|
|
|
|
|
|
|
// Move the pc to after any DROP or NOP.
|
|
|
|
// Move the pc to after any DROP or NOP.
|
|
|
|
while (opcode == OP_DROP || opcode == OP_2DROP || opcode == OP_NOP) { |
|
|
|
while (opcode == OP_DROP || opcode == OP_2DROP || opcode == OP_NOP) { |
|
|
|
if (!script.GetOp (pc, opcode)) |
|
|
|
if (!script.GetOp(pc, opcode)) { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
pc--; |
|
|
|
pc--; |
|
|
|
|
|
|
|
|
|
|
|
/* Now, we have the args and the operation. Check if we have indeed
|
|
|
|
/* Now, we have the args and the operation. Check if we have indeed
|
|
|
@ -43,13 +45,13 @@ CKevaScript::CKevaScript (const CScript& script) |
|
|
|
op and address members, if everything is valid. */ |
|
|
|
op and address members, if everything is valid. */ |
|
|
|
switch (nameOp) { |
|
|
|
switch (nameOp) { |
|
|
|
case OP_KEVA_PUT: |
|
|
|
case OP_KEVA_PUT: |
|
|
|
if (args.size () != 1) { |
|
|
|
if (args.size() != 3) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case OP_KEVA_NAMESPACE: |
|
|
|
case OP_KEVA_NAMESPACE: |
|
|
|
if (args.size () != 1) { |
|
|
|
if (args.size() != 3) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|