diff --git a/include/bitcoin/blockchain/interface/block_chain.hpp b/include/bitcoin/blockchain/interface/block_chain.hpp index bc48b14b..c2487ccf 100644 --- a/include/bitcoin/blockchain/interface/block_chain.hpp +++ b/include/bitcoin/blockchain/interface/block_chain.hpp @@ -107,10 +107,10 @@ class BCB_API block_chain // ------------------------------------------------------------------------ // Not thread safe except as noted. - /// Set the crash lock scope (for use only with insert). + /// Set the flush lock scope (for use only with insert). bool begin_writes(); - /// Reset the crash lock scope (for use only with insert). + /// Reset the flush lock scope (for use only with insert). bool end_writes(); /// Insert a block to the blockchain, height is checked for existence. diff --git a/include/bitcoin/blockchain/interface/fast_chain.hpp b/include/bitcoin/blockchain/interface/fast_chain.hpp index 7e34acda..c6c694d4 100644 --- a/include/bitcoin/blockchain/interface/fast_chain.hpp +++ b/include/bitcoin/blockchain/interface/fast_chain.hpp @@ -86,10 +86,10 @@ class BCB_API fast_chain // Writers. // ------------------------------------------------------------------------ - /// Set the crash lock scope (for use only with insert). + /// Set the flush lock scope (for use only with insert). virtual bool begin_writes() = 0; - /// Reset the crash lock scope (for use only with insert). + /// Reset the flush lock scope (for use only with insert). virtual bool end_writes() = 0; /// Insert a block to the blockchain, height is checked for existence. diff --git a/src/interface/block_chain.cpp b/src/interface/block_chain.cpp index 1f36fef5..99965f03 100644 --- a/src/interface/block_chain.cpp +++ b/src/interface/block_chain.cpp @@ -910,16 +910,16 @@ bool block_chain::stopped() const // Sequential locking helpers. // ---------------------------------------------------------------------------- -// Use to create crash lock scope around multiple closely-spaced inserts. +// Use to create flush lock scope around multiple closely-spaced inserts. // This is a performance optimization that requires write_serial(..., false). bool block_chain::begin_writes() { - return database_.crash_lock(); + return database_.flush_lock(); } bool block_chain::end_writes() { - return database_.crash_unlock(); + return database_.flush_unlock(); } // private diff --git a/src/pools/orphan_pool_manager.cpp b/src/pools/orphan_pool_manager.cpp index 115e177b..f6d0dc03 100644 --- a/src/pools/orphan_pool_manager.cpp +++ b/src/pools/orphan_pool_manager.cpp @@ -69,7 +69,7 @@ bool orphan_pool_manager::start() subscriber_->start(); /////////////////////////////////////////////////////////////////////////// - // Begin crash lock. + // Begin flush lock. return flush_ || fast_chain_.begin_writes(); } @@ -81,7 +81,7 @@ bool orphan_pool_manager::stop() subscriber_->invoke(error::service_stopped, 0, {}, {}); return flush_ || fast_chain_.end_writes(); - // End crash lock. + // End flush lock. /////////////////////////////////////////////////////////////////////////// }