TX time 1970-01-01 01:00:00
I get a lot of TX times of 1970-01-01 01:00:00 and dont understand how / why ? Example code
import blocksci parser_data_directory = '/home/bitcoin/blocksci' chain = blocksci.Blockchain(parser_data_directory) adr=chain.address_from_string('19YGJq2n2e8HrFyUQtxDaX8CdWMuA5nR8Q') print(adr.outs.all[0].tx.hash) print(adr.outs.all[0].tx.block_time)
Yields: 6bc6aa12b88c9f89e26a96ac9a560eb46faf5526e7bb5884e73ff4813b81b9c0 1970-01-01 01:00:00
My assumption is, any data must come from a block and any block must have a timestamp (which is not 0 and later than january 2009).
Thanks for your support.
Yes that indeed looks like a bug. The transaction is missing a reference to the block.
adr = chain.address_from_string("19YGJq2n2e8HrFyUQtxDaX8CdWMuA5nR8Q")
adr.outs.all[0].tx.hash
> c77299e8b0ef0d7fde70da462633c29e08ce46058a629f876d3cd0b317ed3d12
adr.outs.all[0].tx.block
> Block(tx_count=0, height=-1, header_hash=0000000000000000000000000000000000000000000000000000000000000000, version=0, timestamp=0, bits=0, nonce=0)
adr.outs.all[0].tx.block_time
> datetime.datetime(1969, 12, 31, 19, 0)
adr.outs.all[0].tx
> Tx(len(txins)=1, len(txouts)=2, size_bytes=258, block_height=-1, tx_index=210660)
When it should be
tx = chain.tx_with_hash("c77299e8b0ef0d7fde70da462633c29e08ce46058a629f876d3cd0b317ed3d12")
tx
> Tx(len(txins)=1, len(txouts)=2, size_bytes=258, block_height=98457, tx_index=210660)
tx.block
> Block(tx_count=5, height=98457, header_hash=00000000000202f87e887bc55d4fe12af8c42393d847cb5b1d87b1b7cdb9ce1f, version=1, timestamp=1292801190, bits=453335379, nonce=1448427778)