Support fast sync during initial block download

This commit is contained in:
Aditya Kulkarni
2019-06-03 13:28:43 -07:00
parent 9fada760d2
commit 74bb8a4e95
4 changed files with 100 additions and 43 deletions

View File

@@ -185,9 +185,18 @@ void ConnectionLoader::createZcashConf() {
out << "addnode=mainnet.z.cash\n";
out << "rpcuser=zec-qt-wallet\n";
out << "rpcpassword=" % randomPassword() << "\n";
// Fast sync override
if (ui.chkFastSync->isChecked()) {
out << "ibdskiptxverification=1\n";
}
// Datadir override
if (!datadir.isEmpty()) {
out << "datadir=" % datadir % "\n";
}
// Tor override
if (useTor) {
out << "proxy=127.0.0.1:9050\n";
}
@@ -623,6 +632,9 @@ std::shared_ptr<ConnectionConfig> ConnectionLoader::autoDetectZcashConf() {
zcashconf->port.isEmpty()) {
zcashconf->port = "18232";
}
if (name == "ibdskiptxverification" && value == "1") {
zcashconf->skiptxverification = true;
}
}
// If rpcport is not in the file, and it was not set by the testnet=1 flag, then go to default
@@ -649,7 +661,7 @@ std::shared_ptr<ConnectionConfig> ConnectionLoader::loadFromSettings() {
if (username.isEmpty() || password.isEmpty())
return nullptr;
auto uiConfig = new ConnectionConfig{ host, port, username, password, false, false, "", "", ConnectionType::UISettingsZCashD};
auto uiConfig = new ConnectionConfig{ host, port, username, password, false, false, false, "", "", ConnectionType::UISettingsZCashD};
return std::shared_ptr<ConnectionConfig>(uiConfig);
}