如何启动/停止/重新启动结构节点

时间:2018-08-13 18:52:15

标签: hyperledger-fabric hyperledger hyperledger-fabric-ca

我正在使用https://github.com/hyperledger/fabric-samples/tree/release-1.1/fabric-ca进行设置。

以这种方式启动/停止/重新启动结构节点是否正确:

  • docker-compose stop

  • 删除设置并运行

  • docker-compose start

或者还有其他正确的方法吗?

感谢您的帮助!

编辑:添加了答案

2 个答案:

答案 0 :(得分:0)

#include "stdlib.h"

int main() {
    int* arr;
    int n;

    //Get n value by input

    arr = malloc(sizeof(*arr) * n);
    if (arr == NULL) {
        //No memory available, stop program
    }
    memset(arr, 0x00, sizeof(*arr) * n);

    //Do you job here just like before using VLA

    //At the end, before returning, call free function
    free(arr);
}

答案 1 :(得分:0)

这是我为停止和启动网络所做的更改

停止网络:docker-compose stop

在再次启动之前,请从docker compose删除设置并更改容器脚本。

对于CA脚本:将所有内容替换为fabric-ca-server start
对于订购者,只需:orderer
对于同龄人,只需:peer node start
您不需要fabric-ca-tool容器,但是如果要启动它,请确保从运行脚本的主要方法中删除所有通道和链码逻辑。

启动网络:docker-compose start