Hyperledger Fabric Average Max Price FabCar

0 votes

I'm using the fabcar project  (https://github.com/IBM/blockchain-application-using-fabric-java-sdk).

I added a price attribute and I would like to obtain statistics like the average or maximum price of the cars stored.

Is there any Go function to do so?

Thank you very much.
Mar 1, 2020 in Blockchain by pablobonet
• 120 points

Hey, @pablobnet,

You can use GetHistoryForKey() to retrieve all the cars. Then, calculate the average price ciclying on them.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Blockchain

0 votes
3 answers

Hyperledger fabcar sample fabric error: sendPeersProposal - Promise is rejected: Error: Connect Failed

Open the datasources.json file and replace the grpcs:// with grpc://. This solution worked ...READ MORE

answered Apr 30, 2019 in Blockchain by Reshma
0 votes
1 answer

HyperLedger Fabric and Multichain - difference & different use cases

MULTICHAIN: It is a Permissioned Blockchain. It doesn't implement ...READ MORE

answered Dec 28, 2018 in Blockchain by Omkar
• 69,150 points
+4 votes
2 answers

How do I create a new block in Hyperledger Fabric?

This link might help you: https://github.com/hyperledger/fabric-sample ...READ MORE

answered Oct 11, 2018 in Blockchain by Sahu
+1 vote
2 answers

Challenge while setting up Hyperledger Fabric 1.0 in Ubuntu 16.04

The rocksdb error you're seeing wouldn't be ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points

edited Jun 8, 2020 by Sirajul 517 views
+1 vote
1 answer
+15 votes
5 answers
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
• 26,720 points
+1 vote
1 answer