From 440800a4faff9aafde0b68886e33f22ee3d758ff Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 5 Mar 2014 14:05:09 -0600 Subject: [PATCH] Fix killExisting bug. --- libethereum/FeeStructure.h | 8 +++++--- libethereum/State.cpp | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libethereum/FeeStructure.h b/libethereum/FeeStructure.h index 56b8e9c0b..b9bd0cd78 100644 --- a/libethereum/FeeStructure.h +++ b/libethereum/FeeStructure.h @@ -26,11 +26,13 @@ namespace eth { +/** + * The collection of fee amounts that makes up the fee structure. + */ struct FeeStructure { - /// The fee structure. Values yet to be agreed on... - void setMultiplier(u256 _x); ///< The current block multiplier. - u256 multiplier() const; + void setMultiplier(u256 _x); ///< Set the current block multiplier. + u256 multiplier() const; ///< @returns the current block multiplier. u256 m_stepFee; u256 m_dataFee; u256 m_memoryFee; diff --git a/libethereum/State.cpp b/libethereum/State.cpp index 8a88a0a98..4e710cb1d 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -56,6 +56,9 @@ Overlay State::openDB(std::string _path, bool _killExisting) _path = Defaults::get()->m_dbPath; boost::filesystem::create_directory(_path); + if (_killExisting) + boost::filesystem::remove_all(_path + "/state"); + ldb::Options o; o.create_if_missing = true; ldb::DB* db = nullptr;