Changeset View
Changeset View
Standalone View
Standalone View
src/config.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
// Dummy for subclassing in unittests | // Dummy for subclassing in unittests | ||||
class DummyConfig : public Config { | class DummyConfig : public Config { | ||||
public: | public: | ||||
DummyConfig(); | DummyConfig(); | ||||
explicit DummyConfig(std::string net); | explicit DummyConfig(std::string net); | ||||
explicit DummyConfig(std::unique_ptr<CChainParams> chainParamsIn); | explicit DummyConfig(std::unique_ptr<CChainParams> chainParamsIn); | ||||
bool SetMaxBlockSize(uint64_t maxBlockSize) override { return false; } | bool SetMaxBlockSize(uint64_t maxBlockSize) override { return false; } | ||||
uint64_t GetMaxBlockSize() const override { return 0; } | uint64_t GetMaxBlockSize() const override { return 32'000'000; } | ||||
void SetChainParams(std::string net); | |||||
const CChainParams &GetChainParams() const override { return *chainParams; } | const CChainParams &GetChainParams() const override { return *chainParams; } | ||||
void SetCashAddrEncoding(bool) override {} | void SetCashAddrEncoding(bool) override {} | ||||
bool UseCashAddrEncoding() const override { return false; } | bool UseCashAddrEncoding() const override { return false; } | ||||
private: | private: | ||||
std::unique_ptr<CChainParams> chainParams; | std::unique_ptr<CChainParams> chainParams; | ||||
}; | }; | ||||
// Temporary woraround. | // Temporary woraround. | ||||
const Config &GetConfig(); | const Config &GetConfig(); | ||||
#endif // BITCOIN_CONFIG_H | #endif // BITCOIN_CONFIG_H |