mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
@@ -524,7 +524,7 @@ impl Drk {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Auxilliary function to ping configured darkfid daemon for liveness.
|
||||
/// Auxiliary function to ping configured darkfid daemon for liveness.
|
||||
async fn ping(&self) -> Result<()> {
|
||||
eprintln!("Executing ping request to darkfid...");
|
||||
let latency = Instant::now();
|
||||
|
||||
@@ -43,7 +43,7 @@ const GREYLIST_MAX_LEN: usize = 2000;
|
||||
pub type HostsPtr = Arc<Hosts>;
|
||||
|
||||
/// Keeps track of hosts and their current state. Prevents race conditions
|
||||
/// where multiple threads are simultaenously trying to change the state of
|
||||
/// where multiple threads are simultaneously trying to change the state of
|
||||
/// a given host.
|
||||
pub type HostRegistry = RwLock<HashMap<Url, HostState>>;
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ macro_rules! zip {
|
||||
// ANCHOR: transaction
|
||||
/// A Transaction contains an arbitrary number of `ContractCall` objects,
|
||||
/// along with corresponding ZK proofs and Schnorr signatures. `DarkLeaf`
|
||||
/// is used to map relations between contract calls in the transaciton.
|
||||
/// is used to map relations between contract calls in the transaction.
|
||||
#[derive(Clone, Default, Eq, PartialEq, SerialEncodable, SerialDecodable)]
|
||||
pub struct Transaction {
|
||||
/// Calls executed in this transaction
|
||||
@@ -231,7 +231,7 @@ pub struct ContractCallLeaf {
|
||||
pub proofs: Vec<Proof>,
|
||||
}
|
||||
|
||||
/// Auxilliary structure to build a full [`Transaction`] using
|
||||
/// Auxiliary structure to build a full [`Transaction`] using
|
||||
/// [`DarkTree`] to order everything.
|
||||
pub struct TransactionBuilder {
|
||||
/// Contract calls trees forest
|
||||
|
||||
@@ -231,7 +231,7 @@ impl Consensus {
|
||||
Ok(Some(index))
|
||||
}
|
||||
|
||||
/// Auxilliary function to retrieve a fork proposals.
|
||||
/// Auxiliary function to retrieve a fork proposals.
|
||||
/// If provided tip is not the canonical(finalized), or fork doesn't exists,
|
||||
/// an empty vector is returned.
|
||||
pub async fn get_fork_proposals(
|
||||
@@ -271,7 +271,7 @@ impl Consensus {
|
||||
Ok(vec![])
|
||||
}
|
||||
|
||||
/// Auxilliary function to retrieve current best fork proposals.
|
||||
/// Auxiliary function to retrieve current best fork proposals.
|
||||
/// If multiple best forks exist, grab the proposals of the first one
|
||||
/// If provided tip is not the canonical(finalized), or no forks exist,
|
||||
/// an empty vector is returned.
|
||||
@@ -303,7 +303,7 @@ impl Consensus {
|
||||
Ok(ret)
|
||||
}
|
||||
|
||||
/// Auxilliary function to purge current forks and rebuild the ones starting
|
||||
/// Auxiliary function to purge current forks and rebuild the ones starting
|
||||
/// with the provided prefix. This function assumes that the prefix blocks have
|
||||
/// already been appended to canonical chain.
|
||||
pub async fn rebuild_forks(&self, prefix: &[BlockInfo]) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user