mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-26 11:35:10 +00:00
added createConsortium function back, fixed genesis block error
This commit is contained in:
parent
87c7823e58
commit
997a687ffb
1 changed files with 21 additions and 0 deletions
|
|
@ -221,6 +221,26 @@ function createOrgs() {
|
|||
# You can ignore the logs regarding intermediate certs, we are not using them in
|
||||
# this crypto implementation.
|
||||
|
||||
# Generate orderer system channel genesis block.
|
||||
function createConsortium() {
|
||||
which configtxgen
|
||||
if [ "$?" -ne 0 ]; then
|
||||
fatalln "configtxgen tool not found."
|
||||
fi
|
||||
|
||||
infoln "Generating Orderer Genesis block"
|
||||
|
||||
# Note: For some unknown reason (at least for now) the block file can't be
|
||||
# named orderer.genesis.block or the orderer will fail to launch!
|
||||
set -x
|
||||
configtxgen -profile TwoOrgsOrdererGenesis -channelID system-channel -outputBlock ./system-genesis-block/genesis.block
|
||||
res=$?
|
||||
{ set +x; } 2>/dev/null
|
||||
if [ $res -ne 0 ]; then
|
||||
fatalln "Failed to generate orderer genesis block..."
|
||||
fi
|
||||
}
|
||||
|
||||
# After we create the org crypto material and the application channel genesis block,
|
||||
# we can now bring up the peers and ordering service. By default, the base
|
||||
# file for creating the network is "docker-compose-test-net.yaml" in the ``docker``
|
||||
|
|
@ -233,6 +253,7 @@ function networkUp() {
|
|||
# generate artifacts if they don't exist
|
||||
if [ ! -d "organizations/peerOrganizations" ]; then
|
||||
createOrgs
|
||||
createConsortium
|
||||
fi
|
||||
|
||||
COMPOSE_FILES="-f ${COMPOSE_FILE_BASE}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue