How can I traverse the blocks of transactions in hyperledger fabric?

+1 vote

I want to get a list of all transactions in the ledger. I want to do this using chaincode. Is there any API that will help me do this?

May 4, 2018 in Blockchain by Shashank
• 10,330 points
1,508 views

2 answers to this question.

+1 vote
Best answer

For hyperledger fabric you can use query system chaincode and you can query starting from block 0 to block H where H is the ledger height that you can obtain using the QSCC call GetChainInfo.

https://github.com/hyperledger/fabric/blob/master/core/scc/qscc/query.go

answered May 8, 2018 by Rachel

selected Aug 3, 2018 by Omkar
0 votes

Traversing through the Blockchain will be complex. An easy way to get the list transactions from the World StateThe world state holds the current value of the attributes of a business object as a unique ledger state so it's easier than traversing through the Blockchain. 

answered Apr 24 by Rashmi

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

How blocks are linked in the Hyperledger Fabric blockchain?

The structure of block in Hyperledger Fabric ...READ MORE

answered Jul 3, 2018 in Blockchain by Omkar
• 67,120 points
280 views
0 votes
1 answer

How can i copy block aspects in hyperledger fabric?

There are three ways you can do ...READ MORE

answered Jul 6, 2018 in Blockchain by digger
• 27,620 points
29 views
0 votes
1 answer

How can i read headers of blockchain in multichain?

You could use a recent feature known ...READ MORE

answered Mar 26, 2018 in Blockchain by Perry
• 17,010 points
31 views
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
55 views
+1 vote
1 answer
0 votes
1 answer