File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121class ArgsManager ;
2222class CBlock ;
2323class CConnman ;
24- class CBlockUndo ;
2524class CFeeRate ;
2625class CRPCCommand ;
2726class CScheduler ;
@@ -83,22 +82,6 @@ class FoundBlock
8382 mutable bool found = false ;
8483};
8584
86- // ! Block data sent with blockConnected, blockDisconnected notifications.
87- struct BlockInfo {
88- const uint256& hash;
89- const uint256* prev_hash = nullptr ;
90- int height = -1 ;
91- int file_number = -1 ;
92- unsigned data_pos = 0 ;
93- const CBlock* data = nullptr ;
94- const CBlockUndo* undo_data = nullptr ;
95- // The maximum time in the chain up to and including this block.
96- // A timestamp that can only move forward.
97- unsigned int chain_time_max{0 };
98-
99- BlockInfo (const uint256& hash LIFETIMEBOUND ) : hash(hash) {}
100- };
101-
10285// ! Interface giving clients (wallet processes, maybe other analysis tools in
10386// ! the future) ability to access to the chain state, receive notifications,
10487// ! estimate fees, and submit transactions.
Original file line number Diff line number Diff line change 55#ifndef BITCOIN_KERNEL_CHAIN_H
66#define BITCOIN_KERNEL_CHAIN_H
77
8- #include < iostream>
9-
10- class CBlock ;
11- class CBlockIndex ;
12- namespace interfaces {
13- struct BlockInfo ;
14- } // namespace interfaces
8+ #include < attributes.h>
159
16- namespace kernel {
17- // ! Return data from block index.
18- interfaces::BlockInfo MakeBlockInfo (const CBlockIndex* block_index, const CBlock* data = nullptr );
19-
20- } // namespace kernel
10+ #include < iostream>
2111
2212class CBlock ;
2313class CBlockIndex ;
2414class CBlockUndo ;
2515class uint256 ;
2616namespace interfaces {
27- // ! Block data sent with blockConnected and blockDisconnected notifications.
17+ // ! Block data sent with blockConnected, blockDisconnected notifications.
2818struct BlockInfo {
2919 const uint256& hash;
30- const uint256* prev_hash{nullptr };
31- int height{-1 };
32- int file_number{-1 };
33- unsigned data_pos{0 };
34- const CBlock* data{nullptr };
35- const CBlockUndo* undo_data{nullptr };
20+ const uint256* prev_hash = nullptr ;
21+ int height = -1 ;
22+ int file_number = -1 ;
23+ unsigned data_pos = 0 ;
24+ const CBlock* data = nullptr ;
25+ const CBlockUndo* undo_data = nullptr ;
26+ // The maximum time in the chain up to and including this block.
27+ // A timestamp that can only move forward.
3628 unsigned int chain_time_max{0 };
3729
38- explicit BlockInfo (const uint256& block_hash ) : hash(block_hash ) {}
30+ BlockInfo (const uint256& hash LIFETIMEBOUND ) : hash(hash ) {}
3931};
4032} // namespace interfaces
4133
You can’t perform that action at this time.
0 commit comments