File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,13 @@ bool CScript::IsPayToPubkeyHash() const
244244 (*this )[23 ] == OP_EQUALVERIFY &&
245245 (*this )[24 ] == OP_CHECKSIG);
246246}
247+ bool CScript::IsPayToWitnessPubkeyHash () const
248+ {
249+ return (this ->size () == 22 &&
250+ (*this )[0 ] == 0x00 &&
251+ (*this )[1 ] == 0x14 );
252+ }
253+
247254// END ELEMENTS
248255//
249256
Original file line number Diff line number Diff line change @@ -538,6 +538,7 @@ class CScript : public CScriptBase
538538 unsigned int GetSigOpCount (const CScript& scriptSig) const ;
539539
540540 bool IsPayToPubkeyHash () const ;
541+ bool IsPayToWitnessPubkeyHash () const ;
541542 bool IsPayToScriptHash () const ;
542543 bool IsPayToWitnessScriptHash () const ;
543544 bool IsWitnessProgram (int & version, std::vector<unsigned char >& program) const ;
You can’t perform that action at this time.
0 commit comments