But it doesn’t seem to exist in there. Best to check your transaction code again. Possibly a copy/paste issue? Or is it really a Peercoin transaction?
Regarding your second question. I think you are hitting this problem as described here (and solution):
Hope that helps. Just keep in mind that Peercoin has inherited most of the Bitcoin code, so it’s likely that this will work for Peercoin. Haven’t tried myself as it requires reloading the blockchain and I’m still on an old fashioned datacap.
Thanks! I don’t know why I didn’t think to check them on bkchain.org
However, I’m having trouble now searching any transaction id’s on that site. The ones I copy from bkchain.org aren’t being found, and the “transaction id” I’m getting from my own wallet aren’t found there either.
So now that we’ve verified the transaction ID, why can’t I use “gettransaction” to search by transaction id? I’m running Fuzzybear’s Peercoin0.3.2 and I can only do “gettransaction” for transaction id’s from my own wallet.
Specifying txindex=1 in the conf file doesn’t seem to work (for bitcoin this is supposed to keep transaction id’s in the database, which is not done by default (?)).
I’ve also tried rebuilding the database with txindex=1 . Yes, I know txindex is not in the list of startup options for peercoind. There doesn’t seem to be anything similar.
I can only confirm the behaviour you are seeing in the debug window of the wallet.
Valid transactions are not recognised unless from my own wallet. Might have stumbled upon a little bug.
Will try to get @Fuzzybear 's attention as I understand not many users have upgraded to this wallet as it has been only successfully compiled for Windows.
Or as anyone else know the fix for this, please feel free.
gettransaction is a command limited to the transactions you’ve sent/received from your own wallet.
This works this way with Bitcoin’s wallet too.
Searching a transaction would take a huge amount of data, cpu, etc, if you were able to search every transaction ever made. Consider the fact that a blockchain has millions of transactions. Running a gettransaction command wouldn’t be that easy.
This is why block explorers take transactions they see on the network and save them to a database like MySQL for searching later.
Thanks ppcman! I feel a little dumb. I should have doubted my understanding of the whole thing and turned to the internets when I thought “if you can search transaction ids in your wallet database, then what are the block explorer websites for?”
Perhaps there is a hands on tutorial somewhere, or in the works, which will guide people to an understanding of the protocol through little experiments with the RPC like the one you’ve just guided me through? It could be popular… and useful not just to technical types.
I’m more fascinated with crypto than I’ve been with anything in a long time. Not just the technical parts. For instance with the concept that you can use distributed computing and mutual distrust to establish an accounting system that can replace the traditional methods, which seem to me to rely on blind trust backed by some kind of certification (accountants) and regulation (law). I know I’m not the first to say that if this can be proven to work it obviously has vast applications to all kinds of things (one might imagine unhackable software?) far beyond cryptocurrency.
So it looks like given a block hash I can use my wallet’s database to get all the data I need about its constituent transactions. There should be no reason I can’t use the same database to find a block hash given a txid.
SO: is there a function in the Peercoin RPC that will tell me which block a txid is found in? I’m feeling stupid again because I can’t find it.
if I say:
getblock 3be2ef6d4d0462ad34d805756222b7d93d5803a181072a4ec7e3d0c0d63299d5 true
[ …deleted stuff related to the block … ]
“tx” : [
“2014-03-06 09:46:16 UTC”,
" 0000000000000000000000000000000000000000000000000000000000000000 -1",
" out 0.00 “,
“2014-03-06 09:46:16 UTC”,
" da381e14b5dd176afe1a39083ba58219cf4a3591b87e003d638711219a81b51d 1”,
" out 0.00 “,
" out 23568.74 03ab19f9a7 OP_CHECKSIG”,
" out 23568.75 03ab19f9a7 OP_CHECKSIG"
With listtransactions you can if you know the current height (e.g. from getmininginfo). Just deduct the number of confirmations from the current height and you have the block number of your transaction.
in short, -txindex does not work, but getblock … false should give you a raw hex data which you can decypher the hard way, shoot each tx in the block to the decoderawtransaction function and presto the getransaction limitation is bypassed :-*