Output doesn't match with the data in the ledger
rameelrahman opened this issue · 3 comments
Thank you Balaji for share the resource. I have a query regarding the output I got.
Everything worked as said in the read me, but the output data is not the same as the ledger data. Am I doing anything wrong?
Output I got by running this chaincode "java -cp blockchain-client.jar org.app.chaincode.invocation.QueryChaincode" is
INFO: {"make":"Chevy","model":"Volt","colour":"Red","owner":"Nick"}
But I couldn't find the same in the init part of the .go code in the fabcar sample.
Do i need to persist the same into the ledger first? If yes, is there any API in the code sample to do that?
Thank you
@rameelrahman ,
{"make":"Chevy","model":"Volt","colour":"Red","owner":"Nick"} - is not part of init() but we are doing invoke transaction before query with this data. Hence query returns this result.
Hope that clarifies your question. Thanks.
Hope previous response helped you. Hence closing this issue, plz reopen or open a new issue if you have any question.
Hi Mahesh,
Sorry for the delay in responding. Yes, I'm clear now.
Can I know in which chaincode you are running the invoke transaction, I couldn't locate it exactly.