diff --git a/message/src/common/inventory.rs b/message/src/common/inventory.rs index a28b9d61..fd618d75 100644 --- a/message/src/common/inventory.rs +++ b/message/src/common/inventory.rs @@ -32,7 +32,7 @@ impl From for u32 { #[derive(Debug, PartialEq, Clone)] pub struct InventoryVector { - pub inv_type: u32, + pub inv_type: u32, // TODO: change to InventoryType as discussed in #37 pub hash: H256, } diff --git a/sync/src/local_node.rs b/sync/src/local_node.rs index ee5403c7..921a03cf 100644 --- a/sync/src/local_node.rs +++ b/sync/src/local_node.rs @@ -157,6 +157,8 @@ impl LocalNode { } fn execute_synchronization_task(&mut self, task: SynchronizationTask) { + // TODO: what is types::GetBlocks::version here? (@ PR#37) + match task { SynchronizationTask::RequestBlocks(peer_index, blocks_hashes) => { let getdata = types::GetData { diff --git a/sync/src/synchronization.rs b/sync/src/synchronization.rs index f8e5030a..5a43e4ef 100644 --- a/sync/src/synchronization.rs +++ b/sync/src/synchronization.rs @@ -13,7 +13,7 @@ use synchronization_peers::Peers; ///! 2) no forks support ///! ///! When new peer is connected: -///! 1) send `getdata` message with full block locator hashes +///! 1) send `inventory` message with full block locator hashes ///! ///! When `inventory` message is received from peer: ///! 1) if synchronization queue is empty: @@ -33,7 +33,7 @@ use synchronization_peers::Peers; ///! 1) if any basic verification is failed (TODO): ///! 1.1) penalize peer ///! 1.2) stop -///! 1) if not(remove block was not requested): +///! 1) if not(remove block) [i.e. block was not requested]: ///! 1.1) ignore it (TODO: try to append to the chain) ///! 1.2) stop ///! 2) if this block is first block in the `requested_hashes`: