From b9f72e42b88ea02e1405e52a4aaab13f4798a460 Mon Sep 17 00:00:00 2001 From: Substratum Services <33702713+substratumservices@users.noreply.github.com> Date: Tue, 27 Aug 2019 11:27:32 -0400 Subject: [PATCH] GH-97: Update TODOs to relate old Jira card nbrs to new Github issue nbrs. (#524) * GH-97: Update TODOs to relate old Jira card numbers to new Github issue numbers. --- node/src/blockchain/blockchain_interface.rs | 8 ++++---- node/src/neighborhood/gossip_producer.rs | 2 +- node/src/node_configurator/node_configurator_standard.rs | 8 ++++---- node/src/stream_handler_pool.rs | 6 +++--- node/src/sub_lib/tls_framer.rs | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/node/src/blockchain/blockchain_interface.rs b/node/src/blockchain/blockchain_interface.rs index 85427aad1..fb1f6bfd0 100644 --- a/node/src/blockchain/blockchain_interface.rs +++ b/node/src/blockchain/blockchain_interface.rs @@ -49,7 +49,7 @@ pub fn contract_address(chain_id: u8) -> Address { } } -//TODO: SC-501 add ropsten and default to 1u8 for anything else +//TODO: SC-501/GH-115 add ropsten and default to 1u8 for anything else pub fn chain_id_from_name(name: &str) -> u8 { match name.to_lowercase().as_str() { "dev" => 2u8, @@ -69,9 +69,9 @@ const TRANSACTION_LITERAL: H256 = H256 { const TRANSFER_METHOD_ID: [u8; 4] = [0xa9, 0x05, 0x9c, 0xbb]; -pub const DEFAULT_CHAIN_ID: u8 = 3u8; //TODO: SC-501: Change this to 1u8 for mainnet when it's time -pub const DEFAULT_GAS_PRICE: &str = "1"; //TODO: SC-501: Change this to "2" for mainnet when it's time -pub const DEFAULT_CHAIN_NAME: &str = "ropsten"; //TODO: SC-501: Change this to "mainnet" when it's time +pub const DEFAULT_CHAIN_ID: u8 = 3u8; //TODO: SC-501/GH-115: Change this to 1u8 for mainnet when it's time +pub const DEFAULT_GAS_PRICE: &str = "1"; //TODO: SC-501/GH-115: Change this to "2" for mainnet when it's time +pub const DEFAULT_CHAIN_NAME: &str = "ropsten"; //TODO: SC-501/GH-115: Change this to "mainnet" when it's time #[derive(Clone, Debug, Eq, Message, PartialEq)] pub struct Transaction { diff --git a/node/src/neighborhood/gossip_producer.rs b/node/src/neighborhood/gossip_producer.rs index 020b0a236..f0715ca25 100644 --- a/node/src/neighborhood/gossip_producer.rs +++ b/node/src/neighborhood/gossip_producer.rs @@ -36,7 +36,7 @@ impl GossipProducer for GossipProducerReal { .flat_map(|k| database.node_by_key(k)) .fold(GossipBuilder::new(database), |so_far, node_record_ref| { let reveal_node_addr = node_record_ref.public_key() == database.root().public_key() - || target_node_ref.has_half_neighbor(node_record_ref.public_key()); // TODO SC-894: Do we really want to reveal this? + || target_node_ref.has_half_neighbor(node_record_ref.public_key()); // TODO SC-894/GH-132: Do we really want to reveal this? so_far.node(node_record_ref.public_key(), reveal_node_addr) }); builder.build() diff --git a/node/src/node_configurator/node_configurator_standard.rs b/node/src/node_configurator/node_configurator_standard.rs index 572873942..0d082211c 100644 --- a/node/src/node_configurator/node_configurator_standard.rs +++ b/node/src/node_configurator/node_configurator_standard.rs @@ -200,9 +200,9 @@ fn app() -> App<'static, 'static> { .min_values(1) .max_values(1) .takes_value(true) - .possible_values(&["dev", "ropsten"]) // TODO: SC-501: Add "mainnet" - .default_value(DEFAULT_CHAIN_NAME) // TODO: SC-501: Update - .hidden(true), //TODO: SC-501: unhide, add help text, and update README.md + .possible_values(&["dev", "ropsten"]) // TODO: SC-501/GH-115: Add "mainnet" + .default_value(DEFAULT_CHAIN_NAME) // TODO: SC-501/GH-115: Update + .hidden(true), //TODO: SC-501/GH-115: unhide, add help text, and update README.md ) .arg( Arg::with_name("fake-public-key") @@ -1769,7 +1769,7 @@ mod tests { let subject = NodeConfiguratorStandardPrivileged {}; let args = ArgsBuilder::new() .param("--dns-servers", "1.2.3.4") - .param("--chain", "mainnet"); // TODO: SC-501: Remove the should_panic or correct the test in a better way + .param("--chain", "mainnet"); // TODO: SC-501/GH-115: Remove the should_panic or correct the test in a better way subject.configure(&args.into(), &mut FakeStreamHolder::new().streams()); } diff --git a/node/src/stream_handler_pool.rs b/node/src/stream_handler_pool.rs index f3246edf3..7f4d023b6 100644 --- a/node/src/stream_handler_pool.rs +++ b/node/src/stream_handler_pool.rs @@ -253,7 +253,7 @@ impl StreamHandlerPool { } fn handle_transmit_data_msg(&mut self, msg: TransmitDataMsg) { - // TODO Can be recombined with DispatcherNodeQueryMessage after SC-358 + // TODO Can be recombined with DispatcherNodeQueryMessage after SC-358/GH-96 debug!( self.logger, "Handling order to transmit {} bytes to {:?}", @@ -346,7 +346,7 @@ impl StreamHandlerPool { // TODO: This method is wayyyy too big fn handle_dispatcher_node_query_response(&mut self, msg: DispatcherNodeQueryResponse) { - // TODO Can be recombined with TransmitDataMsg after SC-358 + // TODO Can be recombined with TransmitDataMsg after SC-358/GH-96 debug!( self.logger, "Handling node query response containing {:?}", msg.result @@ -449,7 +449,7 @@ impl StreamHandlerPool { .expect("StreamHandlerPool is unbound.") .node_query_response .clone(); - // TODO FIXME revisit once SC-358 is done (idea: create an actor for delaying messages?) + // TODO FIXME revisit once SC-358/GH-96 is done (idea: create an actor for delaying messages?) thread::spawn(move || { // to avoid getting into too-tight a resubmit loop, add a delay; in a separate thread, to avoid delaying other traffic thread::sleep(Duration::from_millis(100)); diff --git a/node/src/sub_lib/tls_framer.rs b/node/src/sub_lib/tls_framer.rs index c8bcd58cd..adcaf5717 100644 --- a/node/src/sub_lib/tls_framer.rs +++ b/node/src/sub_lib/tls_framer.rs @@ -63,7 +63,7 @@ impl TlsFramer { } } - // TODO: This is a very weak set of criteria that will result in many real-life false positives. See SC-227. + // TODO: This is a very weak set of criteria that will result in many real-life false positives. See SC-227/GH-165. fn search_for_frame_offset(data: &[u8]) -> Result { match index_of(data, &[0x03]) { None => Err(0), // Err (0) means don't bother trying again @@ -88,7 +88,7 @@ impl TlsFramer { (candidate >= 0x14) && (candidate <= 0x17) } - // TODO: This should accept 0x0300, 0x0301, 0x0302, and 0x0303. See SC-227. + // TODO: This should accept 0x0300, 0x0301, 0x0302, and 0x0303. See SC-227/GH-165. fn is_valid_protocol_version(byte1: u8, byte2: u8) -> bool { (byte1 == 0x03) && ((byte2 == 0x01) || (byte2 == 0x03)) }