change(docs): Replaces XXX with TODO (#6417)
* Replaces XXX with TODO: * Updates block/tests
This commit is contained in:
parent
e982a437f4
commit
083ddea58a
|
|
@ -1,6 +1,6 @@
|
||||||
//! Tests for Zebra blocks
|
//! Tests for Zebra blocks
|
||||||
|
|
||||||
// XXX generate should be rewritten as strategies
|
// TODO: generate should be rewritten as strategies
|
||||||
#[cfg(any(test, feature = "bench", feature = "proptest-impl"))]
|
#[cfg(any(test, feature = "bench", feature = "proptest-impl"))]
|
||||||
pub mod generate;
|
pub mod generate;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use crate::{
|
||||||
transaction::LockTime,
|
transaction::LockTime,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::generate; // XXX this should be rewritten as strategies
|
use super::generate; // TODO: this should be rewritten as strategies
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn blockheaderhash_debug() {
|
fn blockheaderhash_debug() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use std::{array::TryFromSliceError, io, num::TryFromIntError, str::Utf8Error};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
/// A serialization error.
|
/// A serialization error.
|
||||||
// XXX refine error types -- better to use boxed errors?
|
// TODO: refine error types -- better to use boxed errors?
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
pub enum SerializationError {
|
pub enum SerializationError {
|
||||||
/// An io error that prevented deserialization
|
/// An io error that prevented deserialization
|
||||||
|
|
@ -13,7 +13,7 @@ pub enum SerializationError {
|
||||||
Io(#[from] io::Error),
|
Io(#[from] io::Error),
|
||||||
|
|
||||||
/// The data to be deserialized was malformed.
|
/// The data to be deserialized was malformed.
|
||||||
// XXX refine errors
|
// TODO: refine errors
|
||||||
#[error("parse error: {0}")]
|
#[error("parse error: {0}")]
|
||||||
Parse(&'static str),
|
Parse(&'static str),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,12 +130,12 @@ pub enum TransactionError {
|
||||||
#[error("spend description cv and rk MUST NOT be of small order")]
|
#[error("spend description cv and rk MUST NOT be of small order")]
|
||||||
SmallOrder,
|
SmallOrder,
|
||||||
|
|
||||||
// XXX: the underlying error is bellman::VerificationError, but it does not implement
|
// TODO: the underlying error is bellman::VerificationError, but it does not implement
|
||||||
// Arbitrary as required here.
|
// Arbitrary as required here.
|
||||||
#[error("spend proof MUST be valid given a primary input formed from the other fields except spendAuthSig")]
|
#[error("spend proof MUST be valid given a primary input formed from the other fields except spendAuthSig")]
|
||||||
Groth16(String),
|
Groth16(String),
|
||||||
|
|
||||||
// XXX: the underlying error is io::Error, but it does not implement Clone as required here.
|
// TODO: the underlying error is io::Error, but it does not implement Clone as required here.
|
||||||
#[error("Groth16 proof is malformed")]
|
#[error("Groth16 proof is malformed")]
|
||||||
MalformedGroth16(String),
|
MalformedGroth16(String),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ use std::{collections::HashMap, time::Duration};
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
|
||||||
// XXX should these constants be split into protocol also?
|
// TODO: should these constants be split into protocol also?
|
||||||
use crate::protocol::external::types::*;
|
use crate::protocol::external::types::*;
|
||||||
|
|
||||||
use zebra_chain::{
|
use zebra_chain::{
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ impl Handler {
|
||||||
/// Unexpected messages are left unprocessed, and may be rejected later.
|
/// Unexpected messages are left unprocessed, and may be rejected later.
|
||||||
fn process_message(&mut self, msg: Message) -> Option<Message> {
|
fn process_message(&mut self, msg: Message) -> Option<Message> {
|
||||||
let mut ignored_msg = None;
|
let mut ignored_msg = None;
|
||||||
// XXX can this be avoided?
|
// TODO: can this be avoided?
|
||||||
let tmp_state = std::mem::replace(self, Handler::Finished(Ok(Response::Nil)));
|
let tmp_state = std::mem::replace(self, Handler::Finished(Ok(Response::Nil)));
|
||||||
|
|
||||||
debug!(handler = %tmp_state, %msg, "received peer response to Zebra request");
|
debug!(handler = %tmp_state, %msg, "received peer response to Zebra request");
|
||||||
|
|
|
||||||
|
|
@ -912,7 +912,7 @@ where
|
||||||
|
|
||||||
// Reconfigure the codec to use the negotiated version.
|
// Reconfigure the codec to use the negotiated version.
|
||||||
//
|
//
|
||||||
// XXX The tokio documentation says not to do this while any frames are still being processed.
|
// TODO: The tokio documentation says not to do this while any frames are still being processed.
|
||||||
// Since we don't know that here, another way might be to release the tcp
|
// Since we don't know that here, another way might be to release the tcp
|
||||||
// stream from the unversioned Framed wrapper and construct a new one with a versioned codec.
|
// stream from the unversioned Framed wrapper and construct a new one with a versioned codec.
|
||||||
let bare_codec = peer_conn.codec_mut();
|
let bare_codec = peer_conn.codec_mut();
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use tower::retry::Policy;
|
||||||
|
|
||||||
/// A very basic retry policy with a limited number of retry attempts.
|
/// A very basic retry policy with a limited number of retry attempts.
|
||||||
///
|
///
|
||||||
/// XXX Remove this when <https://github.com/tower-rs/tower/pull/414> lands.
|
/// TODO: Remove this when <https://github.com/tower-rs/tower/pull/414> lands.
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||||
pub struct RetryLimit {
|
pub struct RetryLimit {
|
||||||
remaining_tries: usize,
|
remaining_tries: usize,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue