File tree 2 files changed +23
-0
lines changed 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,28 @@ bool CTxOut::IsBDAP() const
74
74
return false ;
75
75
}
76
76
77
+ void CTxOut::GetBDAPOpCodes (int & opCode1, int & opCode2) const
78
+ {
79
+ if (!IsBDAP ())
80
+ return ;
81
+
82
+ opcodetype opcode;
83
+ CScript::const_iterator pc = scriptPubKey.begin ();
84
+ if (!scriptPubKey.GetOp (pc, opcode))
85
+ return ;
86
+ if (opcode < OP_1 || opcode > OP_16)
87
+ return ;
88
+
89
+ opCode1 = CScript::DecodeOP_N (opcode);
90
+
91
+ if (!scriptPubKey.GetOp (pc, opcode))
92
+ return ;
93
+ if (opcode < OP_1 || opcode > OP_16)
94
+ return ;
95
+
96
+ opCode2 = CScript::DecodeOP_N (opcode);
97
+ }
98
+
77
99
bool CTxOut::IsData () const
78
100
{
79
101
opcodetype opcode;
Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ class CTxOut
220
220
221
221
bool IsBDAP () const ;
222
222
bool IsData () const ;
223
+ void GetBDAPOpCodes (int & opCode1, int & opCode2) const ;
223
224
224
225
std::string ToString () const ;
225
226
};
You can’t perform that action at this time.
0 commit comments