drive_abci/abci/app/
mod.rs1use crate::error::Error;
2use crate::platform_types::platform::Platform;
3use drive::grovedb::Transaction;
4use std::sync::RwLock;
5
6mod check_tx;
7mod consensus;
8pub mod execution_result;
10mod full;
11
12use crate::execution::types::block_execution_context::BlockExecutionContext;
13use crate::platform_types::withdrawal::unsigned_withdrawal_txs_by_round::UnsignedWithdrawalTxsByRound;
14use crate::rpc::core::DefaultCoreRPC;
15#[cfg(test)]
16pub(crate) use check_tx::error_into_status;
17pub use check_tx::CheckTxAbciApplication;
18pub use consensus::ConsensusAbciApplication;
19use dpp::version::PlatformVersion;
20pub use full::FullAbciApplication;
21
22pub trait PlatformApplication<C = DefaultCoreRPC> {
24 fn platform(&self) -> &Platform<C>;
26}
27
28pub trait TransactionalApplication<'a> {
30 fn start_transaction(&self);
32
33 fn transaction(&self) -> &RwLock<Option<Transaction<'a>>>;
35
36 fn commit_transaction(&self, platform_version: &PlatformVersion) -> Result<(), Error>;
38}
39
40pub trait BlockExecutionApplication {
42 fn block_execution_context(&self) -> &RwLock<Option<BlockExecutionContext>>;
44
45 fn unsigned_withdrawal_txs_by_round(&self) -> &RwLock<UnsignedWithdrawalTxsByRound>;
48}