@@ -83,21 +83,21 @@ pub enum ConnectStyle {
83
83
BestBlockFirst ,
84
84
/// The same as BestBlockFirst, however when we have multiple blocks to connect, we only
85
85
/// make a single update_best_block call.
86
- BlockSkippingBestBlockFirst ,
86
+ BestBlockFirstSkippingBlocks ,
87
87
/// Calls transactions_confirmed first, detecting transactions in the block before updating the
88
88
/// header and height information.
89
89
TransactionsFirst ,
90
90
/// The same as TransactionsFirst, however when we have multiple blocks to connect, we only
91
91
/// make a single update_best_block call.
92
- BlockSkippingTransactionsFirst ,
92
+ TransactionsFirstSkippingBlocks ,
93
93
/// Provides the full block via the chain::Listen interface. In the current code this is
94
94
/// equivalent to TransactionsFirst with some additional assertions.
95
95
FullBlockViaListen ,
96
96
}
97
97
98
98
pub fn connect_blocks < ' a , ' b , ' c , ' d > ( node : & ' a Node < ' b , ' c , ' d > , depth : u32 ) -> BlockHash {
99
99
let skip_intermediaries = match * node. connect_style . borrow ( ) {
100
- ConnectStyle :: BlockSkippingBestBlockFirst |ConnectStyle :: BlockSkippingTransactionsFirst => true ,
100
+ ConnectStyle :: BestBlockFirstSkippingBlocks |ConnectStyle :: TransactionsFirstSkippingBlocks => true ,
101
101
_ => false ,
102
102
} ;
103
103
@@ -127,11 +127,11 @@ fn do_connect_block<'a, 'b, 'c, 'd>(node: &'a Node<'b, 'c, 'd>, block: &Block, s
127
127
node. chain_monitor . chain_monitor . block_connected ( & block. header , & txdata, height) ;
128
128
if !skip_manager {
129
129
match * node. connect_style . borrow ( ) {
130
- ConnectStyle :: BestBlockFirst |ConnectStyle :: BlockSkippingBestBlockFirst => {
130
+ ConnectStyle :: BestBlockFirst |ConnectStyle :: BestBlockFirstSkippingBlocks => {
131
131
node. node . update_best_block ( & block. header , height) ;
132
132
node. node . transactions_confirmed ( & block. header , height, & block. txdata . iter ( ) . enumerate ( ) . collect :: < Vec < _ > > ( ) ) ;
133
133
} ,
134
- ConnectStyle :: TransactionsFirst |ConnectStyle :: BlockSkippingTransactionsFirst => {
134
+ ConnectStyle :: TransactionsFirst |ConnectStyle :: TransactionsFirstSkippingBlocks => {
135
135
node. node . transactions_confirmed ( & block. header , height, & block. txdata . iter ( ) . enumerate ( ) . collect :: < Vec < _ > > ( ) ) ;
136
136
node. node . update_best_block ( & block. header , height) ;
137
137
} ,
@@ -155,7 +155,7 @@ pub fn disconnect_blocks<'a, 'b, 'c, 'd>(node: &'a Node<'b, 'c, 'd>, count: u32)
155
155
ConnectStyle :: FullBlockViaListen => {
156
156
Listen :: block_disconnected ( node. node , & orig_header. 0 , orig_header. 1 ) ;
157
157
} ,
158
- ConnectStyle :: BlockSkippingBestBlockFirst |ConnectStyle :: BlockSkippingTransactionsFirst => {
158
+ ConnectStyle :: BestBlockFirstSkippingBlocks |ConnectStyle :: TransactionsFirstSkippingBlocks => {
159
159
if i == count - 1 {
160
160
node. node . update_best_block ( & prev_header. 0 , prev_header. 1 ) ;
161
161
}
0 commit comments