mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-20 06:05:09 +01:00
Split the database trait into read and transactions. (#826)
* Split the database trait into read and transactions. The transaction traits will encapsulate all database changes and also expect READ-and-lock operations to read and lock records from the database for exclusive access, thereby avoiding race conditions. The Transaction trait expects a `rollback` operation on Drop unless the transaction has been committed. * fix: melt quote duplicate error This change stops a second melt quote from being created if there is an existing valid melt quote for an invoice already. If the first melt quote has expired then we allow for a new melt quote to be created. --------- Co-authored-by: thesimplekid <tsk@thesimplekid.com>
This commit is contained in:
@@ -5,14 +5,17 @@ pub mod mint;
|
||||
#[cfg(feature = "wallet")]
|
||||
mod wallet;
|
||||
|
||||
#[cfg(all(feature = "mint", feature = "auth"))]
|
||||
pub use mint::MintAuthDatabase;
|
||||
#[cfg(feature = "mint")]
|
||||
pub use mint::{
|
||||
Database as MintDatabase, KeysDatabase as MintKeysDatabase,
|
||||
ProofsDatabase as MintProofsDatabase, QuotesDatabase as MintQuotesDatabase,
|
||||
Database as MintDatabase, DbTransactionFinalizer as MintDbWriterFinalizer,
|
||||
KeysDatabase as MintKeysDatabase, KeysDatabaseTransaction as MintKeyDatabaseTransaction,
|
||||
ProofsDatabase as MintProofsDatabase, ProofsTransaction as MintProofsTransaction,
|
||||
QuotesDatabase as MintQuotesDatabase, QuotesTransaction as MintQuotesTransaction,
|
||||
SignaturesDatabase as MintSignaturesDatabase,
|
||||
SignaturesTransaction as MintSignatureTransaction, Transaction as MintTransaction,
|
||||
};
|
||||
#[cfg(all(feature = "mint", feature = "auth"))]
|
||||
pub use mint::{MintAuthDatabase, MintAuthTransaction};
|
||||
#[cfg(feature = "wallet")]
|
||||
pub use wallet::Database as WalletDatabase;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user