@@ -25,7 +25,7 @@ use clarity::util::hash::Hash160;
25
25
26
26
use crate :: v0:: messages:: {
27
27
StateMachineUpdate as StateMachineUpdateMessage , StateMachineUpdateContent ,
28
- StateMachineUpdateContentBase , StateMachineUpdateMinerState ,
28
+ StateMachineUpdateMinerState ,
29
29
} ;
30
30
use crate :: v0:: signer_state:: {
31
31
GlobalStateEvaluator , ReplayTransactionSet , SignerStateMachine , UpdateTime ,
@@ -40,16 +40,14 @@ fn generate_global_state_evaluator(num_addresses: u32) -> GlobalStateEvaluator {
40
40
active_protocol_version,
41
41
local_supported_signer_protocol_version,
42
42
StateMachineUpdateContent :: V0 {
43
- base : StateMachineUpdateContentBase {
44
- burn_block : ConsensusHash ( [ 0x55 ; 20 ] ) ,
45
- burn_block_height : 100 ,
46
- current_miner : StateMachineUpdateMinerState :: ActiveMiner {
47
- current_miner_pkh : Hash160 ( [ 0xab ; 20 ] ) ,
48
- tenure_id : ConsensusHash ( [ 0x44 ; 20 ] ) ,
49
- parent_tenure_id : ConsensusHash ( [ 0x22 ; 20 ] ) ,
50
- parent_tenure_last_block : StacksBlockId ( [ 0x33 ; 32 ] ) ,
51
- parent_tenure_last_block_height : 1 ,
52
- } ,
43
+ burn_block : ConsensusHash ( [ 0x55 ; 20 ] ) ,
44
+ burn_block_height : 100 ,
45
+ current_miner : StateMachineUpdateMinerState :: ActiveMiner {
46
+ current_miner_pkh : Hash160 ( [ 0xab ; 20 ] ) ,
47
+ tenure_id : ConsensusHash ( [ 0x44 ; 20 ] ) ,
48
+ parent_tenure_id : ConsensusHash ( [ 0x22 ; 20 ] ) ,
49
+ parent_tenure_last_block : StacksBlockId ( [ 0x33 ; 32 ] ) ,
50
+ parent_tenure_last_block_height : 1 ,
53
51
} ,
54
52
} ,
55
53
)
@@ -95,12 +93,9 @@ fn determine_latest_supported_signer_protocol_versions() {
95
93
local_supported_signer_protocol_version,
96
94
content :
97
95
StateMachineUpdateContent :: V0 {
98
- base :
99
- StateMachineUpdateContentBase {
100
- burn_block,
101
- burn_block_height,
102
- current_miner,
103
- } ,
96
+ burn_block,
97
+ burn_block_height,
98
+ current_miner,
104
99
} ,
105
100
..
106
101
} = local_update. clone ( )
@@ -115,11 +110,9 @@ fn determine_latest_supported_signer_protocol_versions() {
115
110
active_signer_protocol_version,
116
111
new_version,
117
112
StateMachineUpdateContent :: V0 {
118
- base : StateMachineUpdateContentBase {
119
- burn_block,
120
- burn_block_height,
121
- current_miner : current_miner. clone ( ) ,
122
- } ,
113
+ burn_block,
114
+ burn_block_height,
115
+ current_miner : current_miner. clone ( ) ,
123
116
} ,
124
117
)
125
118
. unwrap ( ) ;
@@ -139,11 +132,9 @@ fn determine_latest_supported_signer_protocol_versions() {
139
132
active_signer_protocol_version,
140
133
3 ,
141
134
StateMachineUpdateContent :: V0 {
142
- base : StateMachineUpdateContentBase {
143
- burn_block,
144
- burn_block_height,
145
- current_miner,
146
- } ,
135
+ burn_block,
136
+ burn_block_height,
137
+ current_miner,
147
138
} ,
148
139
)
149
140
. unwrap ( ) ;
@@ -174,12 +165,9 @@ fn determine_global_burn_views() {
174
165
local_supported_signer_protocol_version,
175
166
content :
176
167
StateMachineUpdateContent :: V0 {
177
- base :
178
- StateMachineUpdateContentBase {
179
- burn_block,
180
- burn_block_height,
181
- current_miner,
182
- } ,
168
+ burn_block,
169
+ burn_block_height,
170
+ current_miner,
183
171
} ,
184
172
..
185
173
} = local_update. clone ( )
@@ -197,11 +185,9 @@ fn determine_global_burn_views() {
197
185
active_signer_protocol_version,
198
186
local_supported_signer_protocol_version,
199
187
StateMachineUpdateContent :: V0 {
200
- base : StateMachineUpdateContentBase {
201
- burn_block,
202
- burn_block_height : burn_block_height. wrapping_add ( 1 ) ,
203
- current_miner : current_miner. clone ( ) ,
204
- } ,
188
+ burn_block,
189
+ burn_block_height : burn_block_height. wrapping_add ( 1 ) ,
190
+ current_miner : current_miner. clone ( ) ,
205
191
} ,
206
192
)
207
193
. unwrap ( ) ;
@@ -238,12 +224,9 @@ fn determine_global_states() {
238
224
local_supported_signer_protocol_version,
239
225
content :
240
226
StateMachineUpdateContent :: V0 {
241
- base :
242
- StateMachineUpdateContentBase {
243
- burn_block,
244
- burn_block_height,
245
- current_miner,
246
- } ,
227
+ burn_block,
228
+ burn_block_height,
229
+ current_miner,
247
230
} ,
248
231
..
249
232
} = local_update. clone ( )
@@ -274,11 +257,9 @@ fn determine_global_states() {
274
257
active_signer_protocol_version,
275
258
local_supported_signer_protocol_version,
276
259
StateMachineUpdateContent :: V0 {
277
- base : StateMachineUpdateContentBase {
278
- burn_block,
279
- burn_block_height,
280
- current_miner : new_miner. clone ( ) ,
281
- } ,
260
+ burn_block,
261
+ burn_block_height,
262
+ current_miner : new_miner. clone ( ) ,
282
263
} ,
283
264
)
284
265
. unwrap ( ) ;
@@ -321,12 +302,9 @@ fn determine_global_states_with_tx_replay_set() {
321
302
let StateMachineUpdateMessage {
322
303
content :
323
304
StateMachineUpdateContent :: V0 {
324
- base :
325
- StateMachineUpdateContentBase {
326
- burn_block,
327
- burn_block_height,
328
- current_miner,
329
- } ,
305
+ burn_block,
306
+ burn_block_height,
307
+ current_miner,
330
308
} ,
331
309
..
332
310
} = local_update. clone ( )
@@ -354,11 +332,9 @@ fn determine_global_states_with_tx_replay_set() {
354
332
active_signer_protocol_version,
355
333
local_supported_signer_protocol_version,
356
334
StateMachineUpdateContent :: V1 {
357
- base : StateMachineUpdateContentBase {
358
- burn_block : ConsensusHash ( [ 20u8 ; 20 ] ) ,
359
- burn_block_height,
360
- current_miner : current_miner. clone ( ) ,
361
- } ,
335
+ burn_block : ConsensusHash ( [ 20u8 ; 20 ] ) ,
336
+ burn_block_height,
337
+ current_miner : current_miner. clone ( ) ,
362
338
replay_transactions : vec ! [ ] ,
363
339
} ,
364
340
)
@@ -412,11 +388,9 @@ fn determine_global_states_with_tx_replay_set() {
412
388
active_signer_protocol_version,
413
389
local_supported_signer_protocol_version,
414
390
StateMachineUpdateContent :: V1 {
415
- base : StateMachineUpdateContentBase {
416
- burn_block,
417
- burn_block_height,
418
- current_miner : current_miner. clone ( ) ,
419
- } ,
391
+ burn_block,
392
+ burn_block_height,
393
+ current_miner : current_miner. clone ( ) ,
420
394
replay_transactions : vec ! [ tx. clone( ) ] ,
421
395
} ,
422
396
)
0 commit comments