This question is more to private blockchain frameworks such as Corda, Hyperledger, and others. In all these platforms it is possible to write some programs named chaincode, smart contracts, etc, that allow us to implement the business logic. All of this is deployed in each peer of the blockchain network, but how to avoid and detect that are deployed a different version of the code in some peers?
I'm talking that the final result of the smart contract is the same, so the consensus not is committed, but yes some peers can modify the code that it runs in for any reason.
how we can manage this scenario in private blockchain?