cuprated/
signals.rs

1//! Signals for Cuprate state used throughout the binary.
2
3use tokio::sync::RwLock;
4
5/// Reorg lock.
6///
7/// A [`RwLock`] where a write lock is taken during a reorg and a read lock can be taken
8/// for any operation which must complete without a reorg happening.
9///
10/// Currently, the only operation that needs to take a read lock is adding txs to the tx-pool,
11/// this can potentially be removed in the future, see: <https://github.com/Cuprate/cuprate/issues/305>
12pub static REORG_LOCK: RwLock<()> = RwLock::const_new(());