我正在超级账本结构上执行链码交易,但出现了一些奇怪的错误,如下所示:
2019-07-01T07:21:40.006Z - warn: [Transaction]: _validatePeerResponses: Received error response from peer: message=2 UNKNOWN: Transaction is not valid. Got [d9be41c821926332edc7107655fa4e7c31d34cc5cfbcb4bbc54c658b254c6c1e], expected [239121c61652599982cb82e3a25065d04187d73391c17bb26d9584c7e8b6dee8], stack=Error: 2 UNKNOWN: Transaction is not valid. Got [d9be41c821926332edc7107655fa4e7c31d34cc5cfbcb4bbc54c658b254c6c1e], expected [239121c61652599982cb82e3a25065d04187d73391c17bb26d9584c7e8b6dee8]
1|server | at Object.exports.createStatusError (/home/ubuntu/rest/node_modules/grpc/src/common.js:91:15)
1|server | at Object.onReceiveStatus (/home/ubuntu/node_modules/grpc/src/client_interceptors.js:1204:28)
1|server | at InterceptingListener._callNext (/home/ubuntu/node_modules/grpc/src/client_interceptors.js:568:42)
1|server | at InterceptingListener.onReceiveStatus (/home/ubuntu/rest/node_modules/grpc/src/client_interceptors.js:618:8)
1|server | at callback (/home/ubuntu/node_modules/grpc/src/client_interceptors.js:845:24), code=2, , details=Transaction is not valid. Got [d9be41c821926332edc7107655fa4e7c31d34cc5cfbcb4bbc54c658b254c6c1e], expected [239121c61652599982cb82e3a25065d04187d73391c17bb26d9584c7e8b6dee8]
1|server | Error: Failed to submit transaction: TypeError: Cannot read property 'name' of undefined
1|server | at invoke_transaction (/home/ubuntu/app/express-api-app-v2.js:310:15)
有时交易得到处理,但有时会出现此错误
答案 0 :(得分:0)
错误是名称未定义,位于
/home/ubuntu/app/express-api-app-v2.js行号310
由于您要发送的字段未定义,链码引发错误。
如果遇到问题,请发表评论。