File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020
2121class ArgsManager ;
2222class CBlock ;
23- class CBlockUndo ;
2423class CFeeRate ;
2524class CRPCCommand ;
2625class CScheduler ;
@@ -90,22 +89,6 @@ class FoundBlock
9089 mutable bool found = false ;
9190};
9291
93- // ! Block data sent with blockConnected, blockDisconnected notifications.
94- struct BlockInfo {
95- const uint256& hash;
96- const uint256* prev_hash = nullptr ;
97- int height = -1 ;
98- int file_number = -1 ;
99- unsigned data_pos = 0 ;
100- const CBlock* data = nullptr ;
101- const CBlockUndo* undo_data = nullptr ;
102- // The maximum time in the chain up to and including this block.
103- // A timestamp that can only move forward.
104- unsigned int chain_time_max{0 };
105-
106- BlockInfo (const uint256& hash LIFETIMEBOUND ) : hash(hash) {}
107- };
108-
10992// ! Interface giving clients (wallet processes, maybe other analysis tools in
11093// ! the future) ability to access to the chain state, receive notifications,
11194// ! 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