Я переделываю fabcar-версию hyperledger fabri c и написал несколько функций. Когда я выполнил, я получил указанную ниже ошибку (указанная ниже команда относится к сценарию оболочки)
$ peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile $ORDERER_CA -C $CHANNEL_NAME -n cloud $PEER_CONN_PARMS --isInit -c '{"function":"uploadData","Args":["DATA1","ID12345","/home/samplefile___pdf","3"]}'
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: transaction returned with failure: Function uploadData not found in contract SmartContract"
Ниже приведен цепной код (упомянутый абстрактно)
type SmartContract struct {
contractapi.Contract
}
type Data struct {
Owner string `json:"owner"`
File string `json:"file"`
FileChunkNumber string `json:"filechunknumber"`
SHA256 string `json:"sha256"`
}
// Uploads new data to the world state with given details
func (s *SmartContract) uploadData(ctx contractapi.TransactionContextInterface, args []string) error {
/*...*/
}
Я не понимаю где изменить изменения