Don't use headers first when checkpoints disabled.

Headers first relies on having valid checkpoints, so if checkpoints are
disabled, it needs to be disabled as well.
This commit is contained in:
Dave Collins 2013-12-20 14:01:25 -06:00
parent 2c81f61616
commit cc9aadf041

View file

@ -157,7 +157,7 @@ func (b *blockManager) startSync(peers *list.List) {
// via inv messages. Regression test mode does not support the
// headers-first approach so do normal block downloads when in
// regression test mode.
if height == 0 && !cfg.RegressionTest {
if height == 0 && !cfg.RegressionTest && !cfg.DisableCheckpoints {
bestPeer.PushGetHeadersMsg(locator)
b.fetchingHeaders = true
} else {