added TODOs + fixed documentation

This commit is contained in:
Svyatoslav Nikolsky 2016-10-26 12:24:04 +03:00
parent 2ab18a3ed4
commit cf4ab2e644
3 changed files with 5 additions and 3 deletions

View File

@ -32,7 +32,7 @@ impl From<InventoryType> 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,
}

View File

@ -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 {

View File

@ -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`: