mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
Document more TODOs as tickets (#1418)
Went through the TODOs, removed a bunch, which are outdated or nothing more than a regular comment, documented a bunch more as actual tickets and made them FIXMEs and unified their structure (`FIXME #TICKETNO DESC` for local tickets, `FIXME: DESC LINK` for external tickets) for easier in-editor support. Further more remove unnecessary remarks and related old code that I noticed in that instance.
This commit is contained in:
committed by
GitHub
parent
d2cfd7b9dc
commit
15ae7cfef6
@@ -76,7 +76,6 @@ impl<B: BlockT> ConsensusGossip<B> {
|
||||
if roles.intersects(Roles::AUTHORITY) {
|
||||
trace!(target:"gossip", "Registering {:?} {}", roles, who);
|
||||
// Send out all known messages to authorities.
|
||||
// TODO: limit by size
|
||||
let mut known_messages = HashSet::new();
|
||||
for entry in self.messages.iter() {
|
||||
known_messages.insert((entry.topic, entry.message_hash));
|
||||
|
||||
@@ -213,7 +213,7 @@ impl<B, E> OnDemandService<B> for OnDemand<B, E> where
|
||||
B::Header: HeaderT,
|
||||
{
|
||||
fn on_connect(&self, peer: NodeIndex, role: Roles, best_number: NumberFor<B>) {
|
||||
if !role.intersects(Roles::FULL | Roles::AUTHORITY) { // TODO: correct?
|
||||
if !role.intersects(Roles::FULL | Roles::AUTHORITY) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -458,7 +458,6 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
|
||||
message::FromBlock::Number(n) => BlockId::Number(n),
|
||||
};
|
||||
let max = cmp::min(request.max.unwrap_or(u32::max_value()), MAX_BLOCK_DATA_RESPONSE) as usize;
|
||||
// TODO: receipts, etc.
|
||||
let get_header = request.fields.contains(message::BlockAttributes::HEADER);
|
||||
let get_body = request.fields.contains(message::BlockAttributes::BODY);
|
||||
let get_justification = request.fields.contains(message::BlockAttributes::JUSTIFICATION);
|
||||
@@ -498,7 +497,6 @@ impl<B: BlockT, S: NetworkSpecialization<B>, H: ExHashT> Protocol<B, S, H> {
|
||||
}
|
||||
|
||||
fn on_block_response(&self, io: &mut SyncIo, peer: NodeIndex, request: message::BlockRequest<B>, response: message::BlockResponse<B>) {
|
||||
// TODO: validate response
|
||||
let blocks_range = match (
|
||||
response.blocks.first().and_then(|b| b.header.as_ref().map(|h| h.number())),
|
||||
response.blocks.last().and_then(|b| b.header.as_ref().map(|h| h.number())),
|
||||
|
||||
Reference in New Issue
Block a user