Add --nocheckpoints option.
This commit provides a new flag, --nocheckpoints, to disable built-in checkpoints. Checkpoints are used for a number of things such a ensuring the block chain being downloaded matches various known good blocks, allowing quicker verification on old blocks since scripts don't have to be executed, and preventing forks from old blocks, etc.
This commit is contained in:
parent
c1f0d9b1ad
commit
e04986528c
2 changed files with 28 additions and 23 deletions
|
@ -730,6 +730,10 @@ func newBlockManager(s *server) (*blockManager, error) {
|
|||
quit: make(chan bool),
|
||||
}
|
||||
bm.blockChain = btcchain.New(s.db, s.btcnet, bm.handleNotifyMsg)
|
||||
bm.blockChain.DisableCheckpoints(cfg.DisableCheckpoints)
|
||||
if cfg.DisableCheckpoints {
|
||||
log.Info("[BMGR] Checkpoints are disabled")
|
||||
}
|
||||
|
||||
log.Infof("[BMGR] Generating initial block node index. This may " +
|
||||
"take a while...")
|
||||
|
|
|
@ -59,6 +59,7 @@ type config struct {
|
|||
UseTor bool `long:"tor" description:"Specifies the proxy server used is a Tor node"`
|
||||
TestNet3 bool `long:"testnet" description:"Use the test network"`
|
||||
RegressionTest bool `long:"regtest" description:"Use the regression test network"`
|
||||
DisableCheckpoints bool `long:"nocheckpoints" description:"Disable built-in checkpoints. Don't do this unless you know what you're doing."`
|
||||
DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"`
|
||||
Profile string `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536"`
|
||||
DebugLevel string `short:"d" long:"debuglevel" description:"Logging level {trace, debug, info, warn, error, critical}"`
|
||||
|
|
Loading…
Add table
Reference in a new issue