@@ -1240,8 +1240,8 @@ def sample_spenders():
1240
1240
# Create a list of scripts which will be built into a taptree
1241
1241
scripts = [
1242
1242
# leaf label, followed by CScript
1243
- ("encodeable_pushdata1 " , CScript ([OP_DROP , OP_PUSHDATA1 , b'aa' * 75 ])),
1244
- ("nonstd_encodeable_pushdata1 " , CScript ([ OP_PUSHDATA1 , b'aa' ] )),
1243
+ ("2byte_push " , CScript ([OP_DROP , b' \xaa \xaa ' ])),
1244
+ ("nonstd_2byte_push " , CScript . fromhex ( "4c02aaaa" )),
1245
1245
("dummyleaf" , CScript ([])),
1246
1246
]
1247
1247
@@ -1255,13 +1255,13 @@ def sample_spenders():
1255
1255
spenders = []
1256
1256
1257
1257
# Named comment, using first leaf from scripts, with empty string as witness data, no optional fail condition
1258
- add_spender (spenders , comment = "tutorial/pushdata1 " , tap = tap , leaf = "encodeable_pushdata1 " , inputs = [b'\x00 ' ], no_fail = True )
1258
+ add_spender (spenders , comment = "tutorial/push " , tap = tap , leaf = "2byte_push " , inputs = [b'\x00 ' ], no_fail = True )
1259
1259
1260
1260
# Spender with alternative failure tapscript via over-riding "failure" dictionary, along with the failure's expected err_msg / ERR_*
1261
- add_spender (spenders , comment = "tutorial/pushdata1redux " , tap = tap , leaf = "encodeable_pushdata1 " , inputs = [b'\x00 ' ], failure = {"leaf" : "dummyleaf" }, ** ERR_EVAL_FALSE )
1261
+ add_spender (spenders , comment = "tutorial/pushredux " , tap = tap , leaf = "2byte_push " , inputs = [b'\x00 ' ], failure = {"leaf" : "dummyleaf" }, ** ERR_EVAL_FALSE )
1262
1262
1263
1263
# Spender that is non-standard but otherwise valid, with extraneous signature data from inner key for optional failure condition
1264
- add_spender (spenders , comment = "tutorial/nonminpushdata1 " , tap = tap , leaf = "nonstd_encodeable_pushdata1 " , key = secs [0 ], standard = False , failure = {"inputs" : [getter ("sign" )]}, ** ERR_CLEANSTACK )
1264
+ add_spender (spenders , comment = "tutorial/nonminpush " , tap = tap , leaf = "nonstd_2byte_push " , key = secs [0 ], standard = False , failure = {"inputs" : [getter ("sign" )]}, ** ERR_CLEANSTACK )
1265
1265
1266
1266
# New scripts=[] can be defined, and rinse-repeated as necessary until the spenders list is returned for execution
1267
1267
return spenders
0 commit comments