Hyperledger Fabric world state inconsistency

73 views Asked by At

I'm experimenting on an adapted version of commercial paper + test network (https://github.com/hyperledger/fabric-samples/tree/master/commercial-paper).

I created a paper with the paperlist abstraction and then changed one of its attributes. When getting the state (getState) for a particular paper, I obtain a different result than expected, as it seems that the paper was not updated. Furthermore, the entitiy CouchDB (http://localhost:5984/_utils/) is updated.

Why is the paper updated on couchdb, but when I'm getting the state for the same paper I obtain different results?

I appreciate any help. Cheers

2

There are 2 answers

1
BendaThierry.com On

Maybe because of cache inside your web browser. Try to generate your paper with a timestamped name. So the web address will change at each time : no cache, every request get a fresh paper.

2
raf On

For future reference: I believe it was because I was saving relevant attributes after Object.assign(this, obj);.