Skip to content

Commit 733e48d

Browse files
achow101vijaydasmp
authored andcommitted
Merge bitcoin#29361: refactor: Fix timedata includes
fad0faf refactor: Fix timedata includes (MarcoFalke) Pull request description: Remove unused includes. Also, fixup comments, see https://github.com/bitcoin/bitcoin/pull/28956/files#r1464827885. Also, add missing includes to `chain.h` while touching it. ACKs for top commit: achow101: ACK fad0faf dergoegge: utACK fad0faf stickies-v: ACK fad0faf Tree-SHA512: 45e86f2eb90f0e37012bd83bf30259719e0e58ede18b31f51ca8a6f6d23e6ca4d060fc0f56f821a711cbdb45792b82cf780f5ae3226680d7a966471990f352bc
1 parent 31a75df commit 733e48d

5 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/chain.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@
1010
#include <consensus/params.h>
1111
#include <flatfile.h>
1212
#include <primitives/block.h>
13+
#include <serialize.h>
1314
#include <sync.h>
1415
#include <uint256.h>
1516

17+
#include <algorithm>
18+
#include <cassert>
19+
#include <cstdint>
20+
#include <string>
1621
#include <vector>
1722

1823
/**
1924
* Maximum amount of time that a block timestamp is allowed to exceed the
20-
* current network-adjusted time before the block will be accepted.
25+
* current time before the block will be accepted.
2126
*/
2227
static constexpr int64_t MAX_FUTURE_BLOCK_TIME = 2 * 60 * 60;
2328

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <util/std23.h>
3838
#include <util/strencodings.h>
3939
#include <util/system.h>
40+
#include <util/time.h>
4041
#include <util/trace.h>
4142
#include <validation.h>
4243

@@ -65,7 +66,6 @@
6566

6667
#include <algorithm>
6768
#include <atomic>
68-
#include <chrono>
6969
#include <future>
7070
#include <list>
7171
#include <memory>

src/node/miner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <policy/policy.h>
2020
#include <pow.h>
2121
#include <primitives/transaction.h>
22-
#include <timedata.h>
2322
#include <util/moneystr.h>
2423
#include <util/system.h>
24+
#include <util/time.h>
2525
#include <validation.h>
2626

2727
#include <chainlock/chainlock.h>

src/rpc/mining.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include <util/strencodings.h>
4040
#include <util/string.h>
4141
#include <util/system.h>
42+
#include <util/time.h>
4243
#include <util/translation.h>
4344
#include <validation.h>
4445
#include <validationinterface.h>

src/timedata.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
#ifndef BITCOIN_TIMEDATA_H
66
#define BITCOIN_TIMEDATA_H
77

8-
#include <util/time.h>
9-
108
#include <algorithm>
119
#include <cassert>
12-
#include <chrono>
1310
#include <cstdint>
1411
#include <vector>
1512

0 commit comments

Comments
 (0)