diff --git a/libethereum/BlockChain.cpp b/libethereum/BlockChain.cpp index c49f32ab3..9e624b2cb 100644 --- a/libethereum/BlockChain.cpp +++ b/libethereum/BlockChain.cpp @@ -124,15 +124,15 @@ void BlockChain::import(bytes const& _block, Overlay const& _db) auto newHash = eth::sha3(_block); + clog(BlockChainChat) << "Attempting import of " << newHash << "..."; + // Check block doesn't already exist first! if (details(newHash)) { - clog(BlockChainNote) << " Not new."; + clog(BlockChainChat) << " Not new."; throw AlreadyHaveBlock(); } - clog(BlockChainNote) << "Attempting import of " << newHash << "..."; - // Work out its number as the parent's number + 1 auto pd = details(bi.parentHash); if (!pd) diff --git a/libethereum/BlockChain.h b/libethereum/BlockChain.h index 810dad4ef..919b8ba54 100644 --- a/libethereum/BlockChain.h +++ b/libethereum/BlockChain.h @@ -55,8 +55,9 @@ class Overlay; class AlreadyHaveBlock: public std::exception {}; class UnknownParent: public std::exception {}; -struct BlockChainNote: public LogChannel { static const char constexpr* name = "-B-"; }; -struct BlockChainWarn: public LogChannel { static const char constexpr* name = "!B!"; }; +struct BlockChainChat: public LogChannel { static const char constexpr* name = "-B-"; static const int verbosity = 7; }; +struct BlockChainNote: public LogChannel { static const char constexpr* name = "=B="; static const int verbosity = 1; }; +struct BlockChainWarn: public LogChannel { static const char constexpr* name = "!B!"; static const int verbosity = 0; }; /** * @brief Implements the blockchain database. All data this gives is disk-backed. diff --git a/libethereum/Client.cpp b/libethereum/Client.cpp index b098f1f41..34b46573f 100644 --- a/libethereum/Client.cpp +++ b/libethereum/Client.cpp @@ -169,6 +169,7 @@ void Client::work() m_mineProgress.best = 0; m_lock.unlock(); m_changed = true; + m_miningStarted = false; // need to re-commit to mine. } } else