Ai
6 Star 48 Fork 32

Hyperledger/fabric

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
reset.go 751 Bytes
Copy Edit Raw Blame History
Chongxin Luo authored 2020-01-27 22:52 +08:00 . Fix file license header.
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package node
import (
"github.com/hyperledger/fabric/core/ledger/kvledger"
"github.com/spf13/cobra"
)
func resetCmd() *cobra.Command {
return nodeResetCmd
}
var nodeResetCmd = &cobra.Command{
Use: "reset",
Short: "Resets the node.",
Long: `Resets all channels to the genesis block. When the command is executed, the peer must be offline. When the peer starts after the reset, it will receive blocks starting with block number one from an orderer or another peer to rebuild the block store and state database.`,
RunE: func(cmd *cobra.Command, args []string) error {
config := ledgerConfig()
return kvledger.ResetAllKVLedgers(config.RootFSPath)
},
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hyperledger/fabric.git
git@gitee.com:hyperledger/fabric.git
hyperledger
fabric
fabric
v2.1.1

Search