aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2019-01-11 14:33:11 -1000
committerJonas Schnelli <dev@jonasschnelli.ch>2019-01-11 14:33:24 -1000
commit84d0fdce11709c8e26b9c450d47727ab36641437 (patch)
treeb4187a81a0e133e74a4acfee4f258b92a89ebe49 /src/interfaces
parentb68bac83d9ead9e8893785a58fbed6d09cba4b5c (diff)
parent9d0e52834bbd38e7c7410bcb09ef85d157968b04 (diff)
downloadbitcoin-84d0fdce11709c8e26b9c450d47727ab36641437.tar.xz
Merge #13216: [Qt] implements concept for different disk sizes on intro
9d0e52834 implements different disk sizes for different networks on intro (marcoagner) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/13213. Mostly, I layed out the concept to open the PR for refinement and getting feedback if the approach is okay. Changes are expected. Two points: - The values for both new consts `TESTNET_BLOCK_CHAIN_SIZE` and `TESTNET_CHAIN_STATE_SIZE` is certainly not optimal; I just checked the size of my testnet3 related dirs and set them to little bit higher values. Which values should be used? - Should we do something like this to regtest? Or these "niceties" do not matter when on regtest? Thanks! Tree-SHA512: 8ae87a29fa8356b899e7a823c76cde793d9126b4ee59554d7a2a8edb088fe42a19976b34c06c2fd4a98a727e1e4971dd983f42b6093ea6caa255b45004e22bb4
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.cpp2
-rw-r--r--src/interfaces/node.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
index bd7e414ff3..acba05fd5e 100644
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -60,6 +60,8 @@ public:
bool softSetArg(const std::string& arg, const std::string& value) override { return gArgs.SoftSetArg(arg, value); }
bool softSetBoolArg(const std::string& arg, bool value) override { return gArgs.SoftSetBoolArg(arg, value); }
void selectParams(const std::string& network) override { SelectParams(network); }
+ uint64_t getAssumedBlockchainSize() override { return Params().AssumedBlockchainSize(); }
+ uint64_t getAssumedChainStateSize() override { return Params().AssumedChainStateSize(); }
std::string getNetwork() override { return Params().NetworkIDString(); }
void initLogging() override { InitLogging(); }
void initParameterInteraction() override { InitParameterInteraction(); }
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index 1f8bbbff7a..7fa5958c51 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -52,6 +52,12 @@ public:
//! Choose network parameters.
virtual void selectParams(const std::string& network) = 0;
+ //! Get the (assumed) blockchain size.
+ virtual uint64_t getAssumedBlockchainSize() = 0;
+
+ //! Get the (assumed) chain state size.
+ virtual uint64_t getAssumedChainStateSize() = 0;
+
//! Get network name.
virtual std::string getNetwork() = 0;