1
I realize this can be done at blockchain.info, but would like to find a way to do this with just the bitcoind client. if all I have is the receiving address and the transaction number, I can't figure out what command or set of commands to use. I can get and decode the raw transaction (bitcoind decoderawtransaction $(bitcoind getrawtransaction 3dd264f603f75871c5a36b61db8e137d8cee6b019a8d5bdfdabd7383ccc47068) | less), but that doesn't give me the block number.
note that I can't use gettransaction because my local box (netbook) isn't the origin nor the destination of the transaction; I get error: {"code":-5,"message":"Invalid or non-wallet transaction id"}. I also can't use listreceivedbyaddress for the same reason, although I don't get an error in this case because I did once send to the address in question from my netbook.
note to people coming across this question: don't mark down Luca's answer, I hadn't made it clear at the beginning that I couldn't use gettransaction. added that in just now. – jcomeau_ictx – 2014-02-21T23:16:19.210
1This may be impossible to do without looking up each block down until you get to one that contains it. – John T – 2014-02-23T05:20:02.057
yeah, I'm beginning to think that's probably my only option. I guess that's what blockchain.info does too, just loads all the blocks into a database. – jcomeau_ictx – 2014-02-23T05:26:15.923
If you're good with Javascript this can be done easily with Bitcore. It's really interesting and powerful.
– John T – 2014-02-23T05:30:45.470