mock up DisputePayout
This commit is contained in:
@@ -18,6 +18,39 @@ bool EvalConditionValidity(const CC *cond, const CTransaction *txTo, int nIn)
|
||||
return CheckImportPayout(cond, txTo, nIn);
|
||||
}
|
||||
|
||||
/* Example of how you might call DisputePayout
|
||||
|
||||
if (strcmp(ASSETCHAINS_SYMBOL, "PANGEA") == 0) {
|
||||
if (strcmp(cond->method, "DisputePoker") == 0) {
|
||||
return DisputePayout(PokerVM(), cond, txTo, nIn);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
fprintf(stderr, "no defined behaviour for method: %s\n", cond->method);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool GetPushData(const CScript &sig, std::vector<unsigned char> &data)
|
||||
{
|
||||
opcodetype opcode;
|
||||
auto pc = sig.begin();
|
||||
if (sig.GetOp(pc, opcode, data)) return opcode > OP_0 && opcode <= OP_PUSHDATA4;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool GetOpReturnData(const CScript &sig, std::vector<unsigned char> &data)
|
||||
{
|
||||
auto pc = sig.begin();
|
||||
opcodetype opcode;
|
||||
if (sig.GetOp2(pc, opcode, NULL))
|
||||
if (opcode == OP_RETURN)
|
||||
if (sig.GetOp(pc, opcode, data))
|
||||
return opcode > OP_0 && opcode <= OP_PUSHDATA4;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user