mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Fix issue 1289 with missing parameter in peer chaincode lifecycle command
Signed-off-by: munapower <mmunaro@hotmail.com>
This commit is contained in:
parent
858e3564a4
commit
00bd6aa65c
3 changed files with 9 additions and 6 deletions
|
|
@ -192,8 +192,8 @@ export CHAINCODE_ID=$(peer lifecycle chaincode calculatepackageid asset-transfer
|
|||
Paso siguiente, define el chaincode en el channel de blockchain aprobándolo y asignándoselo. Si ya lo has implementado utilizando la receta `just` de mas arriba, debes incrementar el número de `--sequence` a `2`.
|
||||
|
||||
```bash
|
||||
peer lifecycle chaincode approveformyorg --channelID mychannel --name asset-transfer -v 0 --package-id $CHAINCODE_ID --sequence 2 --connTimeout 15s
|
||||
peer lifecycle chaincode commit --channelID mychannel --name asset-transfer -v 0 --sequence 2 --connTimeout 15s
|
||||
peer lifecycle chaincode approveformyorg --channelID mychannel -o $ORDERER_ENDPOINT --name asset-transfer -v 0 --package-id $CHAINCODE_ID --sequence 2 --connTimeout 15s
|
||||
peer lifecycle chaincode commit --channelID mychannel -o $ORDERER_ENDPOINT --name asset-transfer -v 0 --sequence 2 --connTimeout 15s
|
||||
```
|
||||
|
||||
## Ejecuta el chaincode localmente
|
||||
|
|
|
|||
|
|
@ -192,8 +192,8 @@ export CHAINCODE_ID=$(peer lifecycle chaincode calculatepackageid asset-transfer
|
|||
Next, define the chaincode on the blockchain channel by approving it and committing it. If you have already deployed the chaincode using the `just` recipe above, then increment the `--sequence` number to `2`.
|
||||
|
||||
```bash
|
||||
peer lifecycle chaincode approveformyorg --channelID mychannel --name asset-transfer -v 0 --package-id $CHAINCODE_ID --sequence 2 --connTimeout 15s
|
||||
peer lifecycle chaincode commit --channelID mychannel --name asset-transfer -v 0 --sequence 2 --connTimeout 15s
|
||||
peer lifecycle chaincode approveformyorg --channelID mychannel -o $ORDERER_ENDPOINT --name asset-transfer -v 0 --package-id $CHAINCODE_ID --sequence 2 --connTimeout 15s
|
||||
peer lifecycle chaincode commit --channelID mychannel -o $ORDERER_ENDPOINT --name asset-transfer -v 0 --sequence 2 --connTimeout 15s
|
||||
```
|
||||
|
||||
## Run the chaincode locally
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ microfab: microfab-down
|
|||
export FABRIC_CFG_PATH=$CWDIR/config
|
||||
export CORE_PEER_CLIENT_CONNTIMEOUT=15s
|
||||
export CORE_PEER_DELIVERYCLIENT_CONNTIMEOUT=15s
|
||||
export ORDERER_ENDPOINT=orderer-api.127-0-0-1.nip.io:8080
|
||||
EOF
|
||||
|
||||
cat << EOF > $CFG/org2admin.env
|
||||
|
|
@ -196,6 +197,7 @@ microfab: microfab-down
|
|||
export FABRIC_CFG_PATH=$CWDIR/config
|
||||
export CORE_PEER_CLIENT_CONNTIMEOUT=15s
|
||||
export CORE_PEER_DELIVERYCLIENT_CONNTIMEOUT=15s
|
||||
export ORDERER_ENDPOINT=orderer-api.127-0-0-1.nip.io:8080
|
||||
EOF
|
||||
|
||||
echo
|
||||
|
|
@ -221,14 +223,15 @@ debugcc:
|
|||
export CORE_PEER_ADDRESS=org1peer-api.127-0-0-1.nip.io:8080
|
||||
export CORE_PEER_CLIENT_CONNTIMEOUT=15s
|
||||
export CORE_PEER_DELIVERYCLIENT_CONNTIMEOUT=15s
|
||||
export ORDERER_ENDPOINT=orderer-api.127-0-0-1.nip.io:8080
|
||||
|
||||
echo "CHAINCODE_ID=${CHAINCODE_ID}"
|
||||
|
||||
set -x && peer lifecycle chaincode install asset-transfer.tgz && { set +x; } 2>/dev/null
|
||||
echo
|
||||
set -x && peer lifecycle chaincode approveformyorg --channelID mychannel -o orderer-api.127-0-0-1.nip.io:8080 --name asset-transfer -v 0 --package-id $CHAINCODE_ID --sequence 1 --connTimeout 15s && { set +x; } 2>/dev/null
|
||||
set -x && peer lifecycle chaincode approveformyorg --channelID mychannel -o $ORDERER_ENDPOINT --name asset-transfer -v 0 --package-id $CHAINCODE_ID --sequence 1 --connTimeout 15s && { set +x; } 2>/dev/null
|
||||
echo
|
||||
set -x && peer lifecycle chaincode commit --channelID mychannel -o orderer-api.127-0-0-1.nip.io:8080 --name asset-transfer -v 0 --sequence 1 --connTimeout 15s && { set +x; } 2>/dev/null
|
||||
set -x && peer lifecycle chaincode commit --channelID mychannel -o $ORDERER_ENDPOINT --name asset-transfer -v 0 --sequence 1 --connTimeout 15s && { set +x; } 2>/dev/null
|
||||
echo
|
||||
set -x && peer lifecycle chaincode querycommitted --channelID=mychannel && { set +x; } 2>/dev/null
|
||||
echo
|
||||
|
|
|
|||
Loading…
Reference in a new issue