File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 126126 "OP_CHECKSIGVERIFY" : b"\xad " ,
127127 "OP_CHECKMULTISIG" : b"\xae " ,
128128 "OP_CHECKMULTISIGVERIFY" : b"\xaf " ,
129+ "OP_CHECKSIGADD" : b"\xba " , # added this new OPCODE
129130 # locktime
130131 "OP_NOP2" : b"\xb1 " ,
131132 "OP_CHECKLOCKTIMEVERIFY" : b"\xb1 " ,
132133 "OP_NOP3" : b"\xb2 " ,
133134 "OP_CHECKSEQUENCEVERIFY" : b"\xb2 " ,
135+
134136}
135137
136138CODE_OPS = {
221223 b"\xad " : "OP_CHECKSIGVERIFY" ,
222224 b"\xae " : "OP_CHECKMULTISIG" ,
223225 b"\xaf " : "OP_CHECKMULTISIGVERIFY" ,
226+ b"\xba " : "OP_CHECKSIGADD" , # added this new OPCODE
224227 # locktime
225228 b"\xb1 " : "OP_NOP2" ,
226229 b"\xb1 " : "OP_CHECKLOCKTIMEVERIFY" ,
Original file line number Diff line number Diff line change 1+ import unittest
2+ from bitcoinutils .script import Script
3+
4+ class TestCheckSigAdd (unittest .TestCase ):
5+ def test_checksigadd_opcode (self ):
6+ # Create a script with the new opcode
7+ script = Script (["OP_CHECKSIGADD" ])
8+ # Check if it serializes correctly to hex
9+ self .assertEqual (script .to_hex (), "ba" )
10+
11+ if __name__ == "__main__" :
12+ unittest .main ()
You can’t perform that action at this time.
0 commit comments