support pruning of new databases

This commit is contained in:
benevanoff
2021-04-05 18:56:19 -05:00
parent 1f0f21a8e5
commit 6b0cb8dadb
5 changed files with 43 additions and 3 deletions

View File

@@ -94,6 +94,28 @@ ColumnLayout {
}
}
RowLayout {
id: pruningOptionRow
MoneroComponents.CheckBox {
id: pruneBlockchainCheckBox
checked: !existingDbWarning.visible ? persistentSettings.pruneBlockchain : false
enabled: !existingDbWarning.visible
onClicked: {
persistentSettings.pruneBlockchain = !persistentSettings.pruneBlockchain
this.checked = persistentSettings.pruneBlockchain
}
text: qsTr("Prune blockchain") + translationManager.emptyString
}
Text {
id: existingDbWarning
text: "A blockchain database already exists here. Select a new location to start a pruned node"
visible: daemonManager ? daemonManager.checkLmdbExists(blockchainFolder.text) : false
color: MoneroComponents.Style.defaultFontColor
font.family: MoneroComponents.Style.fontRegular.name
}
}
ColumnLayout{
Layout.topMargin: 6
spacing: 0

View File

@@ -119,6 +119,7 @@ Rectangle {
onMenuClicked: {
if(appWindow.persistentSettings.nettype == 0){
appWindow.persistentSettings.pruneBlockchain = true;
applyWalletMode(1, 'wizardModeBootstrap');
}
}
@@ -139,6 +140,7 @@ Rectangle {
imageIcon: "qrc:///images/local-node-full.png"
onMenuClicked: {
appWindow.persistentSettings.pruneBlockchain = false; // can be toggled on next page
applyWalletMode(2, 'wizardHome');
}
}