getrawtransaction

+1 vote

i'm getting the following message when trying to run the command getrawtransaction:

 

multichain-cli chain1 getrawtransaction 0000b80418f8bb37fa1a37be80ff27fe3afc38d6012afbd889f10b58a0d81b7f 1

{"method":"getrawtransaction","params":["0000b80418f8bb37fa1a37be80ff27fe3afc38d6012afbd889f10b58a0d81b7f",1],"id":1,"chain_name":"chain1"}

error: {"code":-5,"message":"No information available about transaction"}

 

I got the hash above by running (genesis block hash):

multichain-cli chain1 getblockhash 0

I need to run this command (getrawtransaction) in order to obtain the value to set the variable

BITCOINJ_MULTICHAIN_DEMO_RAWHEX=...

and run the bitcoinj wallet demo.

Am I doing something wrong ?
asked Mar 9, 2016 by anonymous

1 Answer

0 votes

Block hashes and transaction IDs are separate, so you can't use a block hash to retrieve a transaction.

So I think you should use getblock rather than getrawtransaction - I can see the comment in our demo code but I think it might be a mistake. Am checking now.

answered Mar 9, 2016 by MultiChain
getrawtransaction
...