HomePhabricator

Refactor: Uses c++ init convention for time variables

Description

Refactor: Uses c++ init convention for time variables

Summary:
This commit does following changes to time variables in net_processing.h:

  • Used {} initialization.
  • Uses universal initializer auto.
  • Uses chrono::literals

The reason for these changes is to make code simpler, and easier to
understand and rationalize.

This concludes backport of core#23832
https://github.com/bitcoin/bitcoin/pull/23832/commits/fe86eb50c986f7b5ccce63f984d8a51cd9ee9e2c

Depends on D13375

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, sdulfari

Reviewed By: #bitcoin_abc, sdulfari

Differential Revision: https://reviews.bitcoinabc.org/D13376

Details

Provenance
Shashwat <svangani239@gmail.com>Authored on Dec 22 2021, 11:18
PiRKCommitted on Mar 20 2023, 07:08
PiRKPushed on Mar 20 2023, 07:08
Reviewer
Restricted Project
Differential Revision
D13376: Refactor: Uses c++ init convention for time variables
Parents
rABC32f920cff995: Refactor: Changes remaining time variable type from int to chrono
Branches
Unknown
Tags
Unknown