{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package bootstrap\n\n## Types\n\n```go\ntype Helper interface {\n\t// GenesisBlock should return the genesis block required to bootstrap\n\t// the ledger (be it reading from the filesystem, generating it, etc.)\n\tGenesisBlock() *ab.Block\n}\n```\nHelper defines the functions a bootstrapping implementation should provide.\n\n```go\ntype Replacer interface {\n\t// ReplaceGenesisBlockFile should first copy the current file to a backup\n\t// file: \u003cgenesis-file-name\u003e =\u003e \u003cgenesis-file-name\u003e.bak\n\t// and then overwrite the original file with the content of the given block.\n\t// If something goes wrong during migration, the original file could be\n\t// restored from the backup.\n\t// An error is returned if the operation was not completed successfully.\n\tReplaceGenesisBlockFile(block *ab.Block) error\n\n\t// CheckReadWrite checks whether the current file is readable and writable,\n\t// because if it is not, there is no point in attempting to replace. This\n\t// check is performed at the beginning of the consensus-type migration\n\t// process.\n\t// An error is returned if the file is not readable and writable.\n\tCheckReadWrite() error\n}\n```\nReplacer provides the ability to to replace the current genesis block used for bootstrapping with the supplied block. It is used during consensus-type migration in order to replace the original genesis block used for bootstrapping with the latest config block of the system channel, which contains the new consensus-type. This will ensure the instantiation of the correct consenter type when the server restarts.\n\n","path":"github.com/eric-erki/https-hyperledger.org/orderer/common/bootstrap","name":"bootstrap","synopsis":"","isRedistributable":true}
