Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: cargo +nightly fmt --all --check

- name: Run cargo clippy
run: cargo +nightly clippy --all-targets
run: cargo +nightly clippy --all-targets -- -D warnings

cross-testing:
strategy:
Expand Down
3 changes: 2 additions & 1 deletion crates/floresta-watch-only/src/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ impl MerkleProof {
let pairs = if node_count % 2 == 0 {
node_count / 2
} else {
(node_count + 1) / 2
// (node_count + 1) / 2
node_count.div_ceil(2)
};

for idx in 0..pairs {
Expand Down
25 changes: 15 additions & 10 deletions crates/floresta-wire/src/p2p_wire/node_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@
//! parameter by the caller.
//!
//! The three flavors of node are:
//! - ChainSelector: This finds the best PoW chain, by downloading multiple candidates and taking
//! the one with more PoW. It should do it's job quickly, as it blocks our main
//! client and can't proceed without this information.
//! - SyncNode: Used to download and verify all blocks in a chain. This is computationally
//! expensive and may take a while to run. After this ends it's job, it gives us 100%
//! centanty that this chain is valid.
//! - Running Node: This is the one that users interacts with, and should be the one running most
//! of the time. This node is started right after `ChainSelector` returns, and
//! will handle new blocks (even if `SyncNode` haven't returned) and handle
//! requests by users.
//! - ChainSelector:
//! This finds the best PoW chain, by downloading multiple candidates and taking
//! the one with more PoW. It should do its job quickly, as it blocks our main
//! client and can't proceed without this information.
//!
//! - SyncNode:
//! Used to download and verify all blocks in a chain. This is computationally
//! expensive and may take a while to run. After this ends its job, it gives us 100%
//! certainty that this chain is valid.
//!
//! - Running Node:
//! This is the one that users interacts with, and should be the one running most
//! of the time. This node is started right after `ChainSelector` returns, and
//! will handle new blocks (even if `SyncNode` haven't returned) and handle
//! requests by users.

use bitcoin::p2p::ServiceFlags;

Expand Down