本文共 584 字,大约阅读时间需要 1 分钟。
// 1. 进入docker,获取当前区块链的配置信息,并存为config.pb# peer channel fetch config -c composerchannel ./config.pb --orderer orderer.example.com:7050
// 2. 将docker中的config.pb拷贝到Ubuntu主机中$ docker cp b7200c1b6150:/opt/gopath/src/github.com/hyperledger/fabric/config.pb /home/fabric/fabric-tools/fabric-scripts/
// 3.将config.pb解析为config.json$ ./hyperledger-fabric-linux-amd64-1.4.0/bin/configtxlator proto_decode --input ./config.pb --type common.Block | jq . > ./config.json
// 4. 查看config.json中的信息// 每10条tx出块一个// 每2s出块一个// 当有tx提交时,且满足上面两个条件之一,就会出一个块(按需出块)// 即截止目前,我的区块高度是8,如果我现在提交一个tx,那么2秒之后就会生成一个区块9了
转载地址:http://ijkof.baihongyu.com/