I read documents about the way Hyperledger Fabric network accepts data to write to the ledger. It's done by endorser peers. But this is another case, I have a scenario like multiple times call PutState.
// 1. Update User
err = stub.PutState(userKey, updateUser)
if err != nil {
return nil, Response.Error
}
// 2. Update Product
err = stub.PutState(productKey, updateProduct)
if err != nil {
return nil, Response.Error
}
It pretty stranges that if the second call (update product) failed, but the first call (update user) successful. The user data still appear in the ledger but it shouldn't. I have two questions:
Can anyone explain to me or give me any documents related to the rollback in this case?
How I can solve this problem to make a true rollback?
Fabric version 1.4