@@ -319,29 +319,23 @@ def test_get_signature_hash(self):
319319 (tx , 0 , script , script_len , 1 , 1 , 16 , out , out_len ), # Invalid flags
320320 (tx , 0 , script , script_len , 1 , 1 , 0 , None , out_len ), # Empty bytes
321321 (tx , 0 , script , script_len , 1 , 1 , 0 , out , 31 ), # Short len
322- ]:
322+ ]:
323323 self .assertEqual (WALLY_EINVAL , wally_tx_get_btc_signature_hash (* args ))
324324
325- def sha256d (hex_ ):
326- bin_input , bin_input_len = make_cbuffer (hex_ )
327- buf , buf_len = make_cbuffer ('00' * 32 )
328- self .assertEqual (WALLY_OK , wally_sha256d (bin_input , bin_input_len , buf , buf_len ))
329- return h (buf )
330-
331325 script , script_len = make_cbuffer ('00' )
332326 out , out_len = make_cbuffer ('00' * 32 )
333327 for args , expected in [
334328 ((tx , 0 , script , script_len , 1 , 1 , 0 , out , out_len ),
335329 utf8 ('1bcf681d585c3cbbc64b30a69e60b721fc0aacc57132dfbe43af6df8f4797a80' )),
336- ((tx , 1 , script , script_len , 1 , 1 , 0 , out , out_len ),
337- utf8 ('01' + '00' * 31 )),
338- ((tx , 0 , script , script_len , 1 , 0 , 0 , out , out_len ),
339- utf8 ('882630e74173c928fc18236b99e25ffd15643faabc65c010e9ca27b8db29278a' )),
340- ((tx , 0 , script , script_len , 1 , 1 , 1 , out , out_len ),
341- utf8 ('5dad88b42332e3559950b325bba69eedb64b9330e55585fc1098964572f9c45d' )),
342- ((tx , 0 , script , script_len , 0 , 1 , 1 , out , out_len ),
343- utf8 ('bb30f5feed35b2591eedd8e778d507236a756e8c2eff8cf72ef0afa83abdea31' )),
344- ]:
330+ ((tx , 1 , script , script_len , 1 , 1 , 0 , out , out_len ),
331+ utf8 ('01' + '00' * 31 )),
332+ ((tx , 0 , script , script_len , 1 , 0 , 0 , out , out_len ),
333+ utf8 ('882630e74173c928fc18236b99e25ffd15643faabc65c010e9ca27b8db29278a' )),
334+ ((tx , 0 , script , script_len , 1 , 1 , 1 , out , out_len ),
335+ utf8 ('5dad88b42332e3559950b325bba69eedb64b9330e55585fc1098964572f9c45d' )),
336+ ((tx , 0 , script , script_len , 0 , 1 , 1 , out , out_len ),
337+ utf8 ('bb30f5feed35b2591eedd8e778d507236a756e8c2eff8cf72ef0afa83abdea31' )),
338+ ]:
345339 self .assertEqual (WALLY_OK , wally_tx_get_btc_signature_hash (* args ))
346340 self .assertEqual (expected , h (out [:out_len ]))
347341
0 commit comments