NEW_POLICY="AND('peer90MSP.member','peer91MSP.member')"
PEER_NAME=peer91
PEER_POD=$(kubectl get pod -l app=$PEER_NAME -o jsonpath="{.items[0].metadata.name}")
Approve change on all peers
kubectl exec --stdin --tty $PEER_POD -c scray-peer-cli -- /bin/sh \
/mnt/conf/peer/update-sig-policy.sh \
$ORDERER_HOST \
$ORDERER_PORT \
$CHANNEL_NAME \
$PKGID \
$NEW_POLICY
Commit changes
kubectl exec --stdin --tty $PEER_POD -c scray-peer-cli -- /bin/sh /mnt/conf/peer/cc_commit_custom_policy.sh $CHANNEL_NAME $PKGID $NEW_POLICY
It is now necessary to approve an operation by members of peer90MSP AND peer91MSP Pseudocode:
peer chaincode invoke -o orderer.example.com:30081 --tls --cafile /tmp/tlsca.example.com-cert.pem -C $CHANNEL_ID
--waitForEvent -n basic \
--peerAddresses peer0.peer90.kubernetes.research.dev.example.com:31625 --tlsRootCertFiles /tmp/90.ca.crt \
--peerAddresses peer0.peer91.kubernetes.research.dev.example.com:32119 --tlsRootCertFiles /tmp/91.ca.crt \
-c '{"function":"CreateAsset","Args":["'${ASSET_ID}'", "'${PRODUCT_BUYER}'"]}'