#hyperledger-fabric #blockchain #hyperledger
Вопрос:
Я пытаюсь отредактировать файл ORG1MSPanchors.tx, поэтому я выполнил следующие команды:
-gt; configtxlator proto_decode --input ./channel-artifacts/ORG1MSPanchors.tx --type common.Envelope gt;channel-artifacts/ORG1MSPanchors.json -gt; nano channel-artifacts/ORG1MSPanchors.json -gt; configtxlator proto_encode --input ./channel-artifacts/ORG1MSPanchors.json --type common.Envelope gt;./channel-artifacts/ORG1MSPanchors.tx
Но изменения не вносятся в ORG1MSPanchors.tx. Кто-нибудь знает, почему это может быть? Спасибо…
Ответ №1:
Используйте флаг вывода вместо «gt;»
configtxlator proto_decode --input ./channel-artifacts/ORG1MSPanchors.tx --type common.Envelope --output ./channel-artifacts/ORG1MSPanchors.json configtxlator proto_encode --input ./channel-artifacts/ORG1MSPanchors.json --type common.Envelope --output ./channel-artifacts/ORG1MSPanchors.tx
Комментарии:
1. Здравствуйте @Christopher, спасибо за ваш ответ. У меня все еще та же проблема, я создаю файл json из файла tx, редактирую его и снова создаю файл tx из измененного файла json. Когда я повторно создаю файл json из измененного файла tx, изменения не сохраняются.
2. Попробуйте сохранить его под другим именем