async def f(): try: sh = bitcoin.address_to_scripthash(addr) hist = await network.get_history_for_scripthash(sh) print_msg(json_encode(hist)) finally: stopping_fut.set_result(1)
def test_address_to_scripthash(self): for priv_details in self.priv_pub_addr: sh = address_to_scripthash(priv_details['address']) self.assertEqual(priv_details['scripthash'], sh)