warning cleanup (#3759)
This commit is contained in:
@@ -69,8 +69,9 @@ pub fn connect_and_monitor(
|
||||
// check seeds first
|
||||
connect_to_seeds_and_peers(peers.clone(), tx.clone(), seed_list, config);
|
||||
|
||||
let mut prev = chrono::Date::<Utc>::MIN_UTC.and_hms(0, 0, 0);
|
||||
let mut prev_expire_check = chrono::Date::<Utc>::MIN_UTC.and_hms(0, 0, 0);
|
||||
let mut prev = DateTime::<Utc>::MIN_UTC;
|
||||
let mut prev_expire_check = DateTime::<Utc>::MIN_UTC;
|
||||
|
||||
let mut prev_ping = Utc::now();
|
||||
let mut start_attempt = 0;
|
||||
let mut connecting_history: HashMap<PeerAddr, DateTime<Utc>> = HashMap::new();
|
||||
|
||||
@@ -168,7 +168,11 @@ fn build_block(
|
||||
|
||||
b.header.pow.nonce = thread_rng().gen();
|
||||
b.header.pow.secondary_scaling = difficulty.secondary_scaling;
|
||||
b.header.timestamp = DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(now_sec, 0), Utc);
|
||||
let ts = NaiveDateTime::from_timestamp_opt(now_sec, 0);
|
||||
if ts.is_none() {
|
||||
return Err(Error::General("Utc::now into timestamp".into()));
|
||||
}
|
||||
b.header.timestamp = DateTime::<Utc>::from_utc(ts.unwrap(), Utc);
|
||||
|
||||
debug!(
|
||||
"Built new block with {} inputs and {} outputs, block difficulty: {}, cumulative difficulty {}",
|
||||
|
||||
Reference in New Issue
Block a user