Only enable txindex if pruning is disabled

This commit is contained in:
Luke Childs 2022-12-22 20:22:59 +07:00 committed by GitHub
parent b7c2658d74
commit 251e7794eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,10 @@ function settingsToMultilineConfString(settings) {
umbrelBitcoinConfig.push(`prune=${Math.round(settings.prune.pruneSizeGB * GB_TO_MiB)}`); umbrelBitcoinConfig.push(`prune=${Math.round(settings.prune.pruneSizeGB * GB_TO_MiB)}`);
} }
// Only enable txindex if pruning is disabled
const txindexEnabled = settings.prune.enabled ? '0' : '1';
umbrelBitcoinConfig.push(`txindex=${txindexEnabled}`);
// reindex // reindex
if (settings.reindex) { if (settings.reindex) {
umbrelBitcoinConfig.push('# Rebuild chain state and block index from the blk*.dat files on disk.'); umbrelBitcoinConfig.push('# Rebuild chain state and block index from the blk*.dat files on disk.');