Squash remaining warnings (#6789)
* Fixed comment warnings * Fixed remaining warnings
This commit is contained in:
parent
44db0c55c5
commit
5b29b6d064
@ -268,7 +268,7 @@ impl Server {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let mut allowed_hosts: Option<Vec<Host>> = allowed_hosts.into();
|
let mut allowed_hosts: Option<Vec<Host>> = allowed_hosts.into();
|
||||||
allowed_hosts.as_mut().map(|mut hosts| {
|
allowed_hosts.as_mut().map(|hosts| {
|
||||||
hosts.push(format!("http://*.{}:*", DAPPS_DOMAIN).into());
|
hosts.push(format!("http://*.{}:*", DAPPS_DOMAIN).into());
|
||||||
hosts.push(format!("http://*.{}", DAPPS_DOMAIN).into());
|
hosts.push(format!("http://*.{}", DAPPS_DOMAIN).into());
|
||||||
});
|
});
|
||||||
|
@ -263,7 +263,7 @@ impl EthereumMachine {
|
|||||||
} else if block_number < ext.eip150_transition {
|
} else if block_number < ext.eip150_transition {
|
||||||
Schedule::new_homestead()
|
Schedule::new_homestead()
|
||||||
} else {
|
} else {
|
||||||
/// There's no max_code_size transition so we tie it to eip161abc
|
// There's no max_code_size transition so we tie it to eip161abc
|
||||||
let max_code_size = if block_number >= ext.eip161abc_transition {
|
let max_code_size = if block_number >= ext.eip161abc_transition {
|
||||||
self.params.max_code_size as usize
|
self.params.max_code_size as usize
|
||||||
} else {
|
} else {
|
||||||
|
@ -477,8 +477,8 @@ mod tests {
|
|||||||
.expect("Seed should be valid H128")
|
.expect("Seed should be valid H128")
|
||||||
.to_vec();
|
.to_vec();
|
||||||
|
|
||||||
/// private key from bitcoin test vector
|
// private key from bitcoin test vector
|
||||||
/// xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs
|
// xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs
|
||||||
let test_private = H256::from_str("e8f32e723decf4051aefac8e2c93c9c5b214313817cdb01a1494b917c8436b35")
|
let test_private = H256::from_str("e8f32e723decf4051aefac8e2c93c9c5b214313817cdb01a1494b917c8436b35")
|
||||||
.expect("Private should be decoded ok");
|
.expect("Private should be decoded ok");
|
||||||
|
|
||||||
@ -489,8 +489,8 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_vector_1() {
|
fn test_vector_1() {
|
||||||
/// xprv9uHRZZhk6KAJC1avXpDAp4MDc3sQKNxDiPvvkX8Br5ngLNv1TxvUxt4cV1rGL5hj6KCesnDYUhd7oWgT11eZG7XnxHrnYeSvkzY7d2bhkJ7
|
// xprv9uHRZZhk6KAJC1avXpDAp4MDc3sQKNxDiPvvkX8Br5ngLNv1TxvUxt4cV1rGL5hj6KCesnDYUhd7oWgT11eZG7XnxHrnYeSvkzY7d2bhkJ7
|
||||||
/// H(0)
|
// H(0)
|
||||||
test_extended(
|
test_extended(
|
||||||
|secret| secret.derive(2147483648.into()),
|
|secret| secret.derive(2147483648.into()),
|
||||||
H256::from_str("edb2e14f9ee77d26dd93b4ecede8d16ed408ce149b6cd80b0715a2d911a0afea")
|
H256::from_str("edb2e14f9ee77d26dd93b4ecede8d16ed408ce149b6cd80b0715a2d911a0afea")
|
||||||
@ -500,8 +500,8 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_vector_2() {
|
fn test_vector_2() {
|
||||||
/// xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs
|
// xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs
|
||||||
/// H(0)/1
|
// H(0)/1
|
||||||
test_extended(
|
test_extended(
|
||||||
|secret| secret.derive(2147483648.into()).derive(1.into()),
|
|secret| secret.derive(2147483648.into()).derive(1.into()),
|
||||||
H256::from_str("3c6cb8d0f6a264c91ea8b5030fadaa8e538b020f0a387421a12de9319dc93368")
|
H256::from_str("3c6cb8d0f6a264c91ea8b5030fadaa8e538b020f0a387421a12de9319dc93368")
|
||||||
|
@ -201,7 +201,7 @@ impl Manager {
|
|||||||
where F: Fn() -> Result<R, &'static str>
|
where F: Fn() -> Result<R, &'static str>
|
||||||
{
|
{
|
||||||
let mut err = Error::KeyNotFound;
|
let mut err = Error::KeyNotFound;
|
||||||
/// Try to open device a few times.
|
// Try to open device a few times.
|
||||||
for _ in 0..10 {
|
for _ in 0..10 {
|
||||||
match f() {
|
match f() {
|
||||||
Ok(handle) => return Ok(handle),
|
Ok(handle) => return Ok(handle),
|
||||||
|
@ -471,7 +471,7 @@ fn rpc_eth_transaction_count() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn rpc_eth_transaction_count_next_nonce() {
|
fn rpc_eth_transaction_count_next_nonce() {
|
||||||
let tester = EthTester::new_with_options(EthClientOptions::with(|mut options| {
|
let tester = EthTester::new_with_options(EthClientOptions::with(|options| {
|
||||||
options.pending_nonce_from_queue = true;
|
options.pending_nonce_from_queue = true;
|
||||||
}));
|
}));
|
||||||
tester.miner.increment_last_nonce(1.into());
|
tester.miner.increment_last_nonce(1.into());
|
||||||
@ -1104,7 +1104,7 @@ fn rpc_get_work_returns_correct_work_package() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn rpc_get_work_should_not_return_block_number() {
|
fn rpc_get_work_should_not_return_block_number() {
|
||||||
let eth_tester = EthTester::new_with_options(EthClientOptions::with(|mut options| {
|
let eth_tester = EthTester::new_with_options(EthClientOptions::with(|options| {
|
||||||
options.send_block_number_in_get_work = false;
|
options.send_block_number_in_get_work = false;
|
||||||
}));
|
}));
|
||||||
eth_tester.miner.set_author(Address::from_str("d46e8dd67c5d32be8058bb8eb970870f07244567").unwrap());
|
eth_tester.miner.set_author(Address::from_str("d46e8dd67c5d32be8058bb8eb970870f07244567").unwrap());
|
||||||
|
@ -419,7 +419,7 @@ impl<T> SessionImpl<T> where T: SessionTransport {
|
|||||||
|
|
||||||
// find share source
|
// find share source
|
||||||
{
|
{
|
||||||
let mut move_confirmations_to_receive = data.move_confirmations_to_receive.as_mut()
|
let move_confirmations_to_receive = data.move_confirmations_to_receive.as_mut()
|
||||||
.expect("move_confirmations_to_receive are filled during consensus establishing; move confirmations are processed after this; qed");
|
.expect("move_confirmations_to_receive are filled during consensus establishing; move confirmations are processed after this; qed");
|
||||||
if !move_confirmations_to_receive.remove(sender) {
|
if !move_confirmations_to_receive.remove(sender) {
|
||||||
return Err(Error::InvalidMessage);
|
return Err(Error::InvalidMessage);
|
||||||
|
@ -247,7 +247,7 @@ mod test {
|
|||||||
|
|
||||||
// when
|
// when
|
||||||
{
|
{
|
||||||
let mut row = table.row_mut(&1).unwrap();
|
let row = table.row_mut(&1).unwrap();
|
||||||
row.remove(&1);
|
row.remove(&1);
|
||||||
row.remove(&2);
|
row.remove(&2);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user