File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,16 @@ def decodescript_script_pub_key(self):
187
187
assert_equal ('1 ' + xonly_public_key , rpc_result ['asm' ])
188
188
assert 'segwit' not in rpc_result
189
189
190
+ self .log .info ("- P2A (anchor)" )
191
+ # 1 <4e73>
192
+ witprog_hex = '4e73'
193
+ rpc_result = self .nodes [0 ].decodescript ('5102' + witprog_hex )
194
+ assert_equal ('anchor' , rpc_result ['type' ])
195
+ # in the disassembly, the witness program is shown as single decimal due to its small size
196
+ witprog_as_decimal = int .from_bytes (bytes .fromhex (witprog_hex ), 'little' )
197
+ assert_equal (f'1 { witprog_as_decimal } ' , rpc_result ['asm' ])
198
+ assert_equal ('bcrt1pfeesnyr2tx' , rpc_result ['address' ])
199
+
190
200
def decoderawtransaction_asm_sighashtype (self ):
191
201
"""Test decoding scripts via RPC command "decoderawtransaction".
192
202
You can’t perform that action at this time.
0 commit comments