File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,18 @@ bool CScript::IsPayToScriptHash() const
251251 this ->at (22 ) == OP_EQUAL);
252252}
253253
254+ bool CScript::IsPayToColdStaking () const
255+ {
256+ // Extra-fast test for pay-to-cold-staking CScripts:
257+ return (this ->size () == 51 &&
258+ this ->at (2 ) == OP_ROT &&
259+ this ->at (4 ) == OP_CHECKCOLDSTAKEVERIFY &&
260+ this ->at (5 ) == 0x14 &&
261+ this ->at (27 ) == 0x14 &&
262+ this ->at (49 ) == OP_EQUALVERIFY &&
263+ this ->at (50 ) == OP_CHECKSIG);
264+ }
265+
254266bool CScript::StartsWithOpcode (const opcodetype opcode) const
255267{
256268 return (!this ->empty () && this ->at (0 ) == opcode);
Original file line number Diff line number Diff line change @@ -605,6 +605,7 @@ class CScript : public std::vector<unsigned char>
605605
606606 bool IsNormalPaymentScript () const ;
607607 bool IsPayToScriptHash () const ;
608+ bool IsPayToColdStaking () const ;
608609 bool StartsWithOpcode (const opcodetype opcode) const ;
609610 bool IsZerocoinMint () const ;
610611 bool IsZerocoinSpend () const ;
You can’t perform that action at this time.
0 commit comments