Skip to content

Commit

Permalink
GH-97: Update TODOs to relate old Jira card nbrs to new Github issue …
Browse files Browse the repository at this point in the history
…nbrs. (#524)

* GH-97: Update TODOs to relate old Jira card numbers to new Github issue numbers.
  • Loading branch information
substratumservices authored and steveswing committed Aug 27, 2019
1 parent 71a38fc commit b9f72e4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions node/src/blockchain/blockchain_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion node/src/neighborhood/gossip_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions node/src/node_configurator/node_configurator_standard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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());
}
Expand Down
6 changes: 3 additions & 3 deletions node/src/stream_handler_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {:?}",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions node/src/sub_lib/tls_framer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<usize, usize> {
match index_of(data, &[0x03]) {
None => Err(0), // Err (0) means don't bother trying again
Expand All @@ -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))
}
Expand Down

0 comments on commit b9f72e4

Please sign in to comment.