Trying to build a block explorer, wondering why I am getting errors when attempting to run getrawtransaction:
~/florincoin/src$ ./florincoind getblock 1c57783191f9fab7cf4dc62be10ce60cb5a4dd5de1172bb08e1c66df6d16a1c5
{
"hash" : "1c57783191f9fab7cf4dc62be10ce60cb5a4dd5de1172bb08e1c66df6d16a1c5",
"confirmations" : 19298,
"size" : 191,
"height" : 1,
"version" : 1,
"merkleroot" : "43f3ad0e1af0fa3d3e9c5bc36f30e5d59926d74a6ce73c390e7e39b28afc4248",
"tx" : [
"43f3ad0e1af0fa3d3e9c5bc36f30e5d59926d74a6ce73c390e7e39b28afc4248"
],
"time" : 1371501379,
"nonce" : 2009335552,
"bits" : "1e0ffff0",
"difficulty" : 0.00024414,
"previousblockhash" : "09c7781c9df90708e278c35d38ea5c9041d7ecfcdd1c56ba67274b7cff3e1cea",
"nextblockhash" : "c744f44d573c215e6d5d8dff26342cbee08db716a3da2a9d88427b546745cfb9"
}
~/florincoin/src$ ./florincoind getblock 09c7781c9df90708e278c35d38ea5c9041d7ecfcdd1c56ba67274b7cff3e1cea
{
"hash" : "09c7781c9df90708e278c35d38ea5c9041d7ecfcdd1c56ba67274b7cff3e1cea",
"confirmations" : 19299,
"size" : 311,
"height" : 0,
"version" : 1,
"merkleroot" : "730f0c8ddc5a592d5512566890e2a73e45feaa6748b24b849d1c29a7ab2b2300",
"tx" : [
"730f0c8ddc5a592d5512566890e2a73e45feaa6748b24b849d1c29a7ab2b2300"
],
"time" : 1371488396,
"nonce" : 1000112548,
"bits" : "1e0ffff0",
"difficulty" : 0.00024414,
"nextblockhash" : "1c57783191f9fab7cf4dc62be10ce60cb5a4dd5de1172bb08e1c66df6d16a1c5"
}
~/florincoin/src$ ./florincoind decoderawtransaction 730f0c8ddc5a592d5512566890e2a73e45feaa6748b24b849d1c29a7ab2b2300
error: {"code":-22,"message":"TX decode failed"}
~/florincoin/src$ ./florincoind decoderawtransaction 43f3ad0e1af0fa3d3e9c5bc36f30e5d59926d74a6ce73c390e7e39b28afc4248
error: {"code":-22,"message":"TX decode failed"}
I know the genesis block technically does not return anything from decoderawtransaction, however the second transaction from block 2 should technically return JSON data, right?
I have the following setting on the florincoin.conf:
txindex=1
EDIT: Working now, I think I had to wait for the blockchain to update after setting txindex=1. Is that true? New to this stuff, would like to learn and help out as much as possible
