citp/BlockSci

Any alternative to chain.address_from_string() not working, returning null for valid address strings?

alex-btc opened this issue · 1 comments

It seems address_from_string() don't work for a lot of addresses, it returns null, see example below:

import blocksci
chain = blocksci.Blockchain('/home/username/BlockSci/config.conf')
# does not work:
chain.address_from_string('34fDhXLTcbPFZwRYGwTTppmmhfvox1aWVw')
chain.address_from_string('bc1q3x6kfj9gkk8yzg76z2kdgtusenadlxw0dxpc8v')
# work:
chain.address_from_string('3GVcuQS8xyqPLgpoBu1CHxTXYSSW2bMPwZ')
Out[3]: ScriptHashAddress(3GVcuQS8xyqPLgpoBu1CHxTXYSSW2bMPwZ)

Is there any other form of constructing an address object only knowing the address string in the form 'bc1q3x6kfj9gkk8yzg76z2kdgtusenadlxw0dxpc8v', for example, without using the chain.address_from_string() method?

There is another method chain.addresses_with_prefix(), but it is too slow, it is impractical to use.

Any other idea? Thanks!

System Information

Using AMI: no
BlockSci version: 0.7
Blockchain: bitcoin
Parser: Disk
Total memory: 128 GB

It seems the problem is that I was looking for addresses in blocks after the last block I parsed.

Looking for old addresses work fine.