我試圖運行自定義鏈式代碼。我是能夠成功地部署,但是當我使用運行調用命令:Hyperledger Fabric自定義鏈式代碼調用失敗
peer chaincode invoke -n mycc -c '{"Args":["write","hello_world", "200"]}'
面對這樣的錯誤消息:對等chaincode的成功部署後
Error: Error endorsing chaincode: rpc error: code = 2 desc = Error deploying chaincode: Failed to launch chaincode spec(Could not get deployment transaction from LCCC for mycc - Error deploying chaincode: Transaction or query returned with failure: transaction not found default/mycc)
日誌(運行在DEV模式等) :
13:48:06.320 [shim] INFO : Chaincode log level not provided; defaulting to: DEBUG
13:48:06.320 [shim] DEBU : Peer address: 0.0.0.0:7051
13:48:06.321 [shim] DEBU : os.Args returns: [./chaincode_start]
13:48:06.323 [shim] DEBU : Registering.. sending REGISTER
13:48:06.324 [shim] DEBU : []Received message REGISTERED from shim
13:48:06.325 [shim] DEBU : []Handling ChaincodeMessage of type: REGISTERED(state:created)
13:48:06.325 [shim] DEBU : Received REGISTERED, ready for invocations
13:54:16.458 [shim] DEBU : [lccc]Received message INIT from shim
13:54:16.458 [shim] DEBU : [lccc]Handling ChaincodeMessage of type: INIT(state:established)
13:54:16.458 [shim] DEBU : Entered state init
13:54:16.458 [shim] DEBU : [lccc]Received INIT, initializing chaincode
13:54:16.461 [shim] DEBU : [lccc]Inside putstate
13:54:16.461 [shim] DEBU : [lccc]Sending PUT_STATE
13:54:16.462 [shim] DEBU : [lccc]Received message RESPONSE from shim
13:54:16.462 [shim] DEBU : [lccc]Handling ChaincodeMessage of type: RESPONSE(state:init)
13:54:16.462 [shim] DEBU : [lccc]before send
13:54:16.462 [shim] DEBU : [lccc]after send
13:54:16.464 [shim] DEBU : [lccc]Received RESPONSE, communicated (state:init)
13:54:16.464 [shim] DEBU : [lccc]Received RESPONSE. Successfully updated state
13:54:16.464 [shim] DEBU : [lccc]Init succeeded. Sending COMPLETED
13:54:16.464 [shim] DEBU : [lccc]Move state message COMPLETED
13:54:16.464 [shim] DEBU : [lccc]Handling ChaincodeMessage of type: COMPLETED(state:init)
13:54:16.465 [shim] DEBU : [lccc]send state message COMPLETED
任何指向我出錯的地方都會很棒。提前致謝。
請包括用於部署鏈碼的命令。我想知道是否確實使用-n開關將鏈代碼命名爲「mycc」 – Ashishkel
這是部署命令:peer chaincode deploy -n mycc -c'{「Args」:[「init」,「100」]} ' – meraki