// Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use Arc;
use Mutex;
use PendingProposal;
/// Per-chain state holding the proposal mutex.
///
/// The mutex serves two purposes:
/// 1. It serializes block proposals so the client never makes conflicting proposals
/// (which could brick the chain in the Fast consensus round).
/// 2. Its locked value holds the pending proposal, ensuring that reads and writes
/// to the pending proposal are always synchronized with the proposal flow.