GetRawTransaction not returning time

I am trying to write a quick blockchain explorer so that I can lookup transactions on my own server rather than using a 3rd party service – consider this an exercise more than a production service. I have a bitcoind server running with txindex = 1 and all is well, I can lookup transaction with getrawtransaction. But unconfirmed transactions do not have block data, and most importantly the time field.

However many 3rd party lookup services like blockchain, tradeblock, etc return a timestamp for the transaction even when not confirmed. So I have tried to use the walletnotify command to record the time the transaction is seen but it’s not getting called – probably due to the fact I have disablewallet=1 or because these transactions do not relate to my server.

So my next step is to continuously check the transactions in the current block and record the timestamp that way – suffice to say this is not the best approach but I am really struggling to think of another way.

Perhaps someone has a better approach?

Recent Questions – Bitcoin Stack Exchange

searchrawtransactions in bitcoin-cli returning “Method not found” error

some days ago I installed bitcoin core patched with the addrindex option ( btcdrak version ), after indexing the entire blockchain for 5 days, I tried to use the searchrawtransactions parameter on bitcoin-cli in order to query some addresses, but it is returning the following error:

error code: -32601 error message: Method not found 

In github I saw the following statement:

First run will require a full reindex of the blockchain. After that, the searchrawtransactions will be available.

But it’s not working for me. Anyone has experience with this or with any other bitcoin core patched version?

Recent Questions – Bitcoin Stack Exchange

GetAddr not returning connected node addresses

I am writing a simple program that connects to nodes in order to index them, kind of like blockchain.info nodes works. Doing this in GLang using the btcd/wire library to create the messages, the message sequence is as follows:

Version -> <- Version <- Version Acknowledge <- Ping Pong -> GetAddr -> <- Addr 

However upon reading the list of addresses returned they all are either empty or contain a single address that corresponds to that nodes address (I.E. it returns its own address).

From reading the wiki I know nodes only return addresses of connected nodes that have a timestap less than 3 hours ago, and that there are certain dns nodes and seed nodes. Are there any nodes that will always return connected peers regardless of their age? Or any way to bootstrap the process? How does a normal full node connect to more than a handful of nodes when these may never return anything (if they have been alive for more than 3 hours, then they will only return something on new connections)?

Recent Questions – Bitcoin Stack Exchange