File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
stackslib/src/chainstate/stacks Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -2216,7 +2216,7 @@ impl StacksBlockBuilder {
2216
2216
// mine an empty block so you can start your tenure quickly!
2217
2217
if let Some ( tx) = initial_txs. first ( ) {
2218
2218
if matches ! ( & tx. payload, TransactionPayload :: TenureChange ( _) ) {
2219
- debug ! ( "Nakamoto miner heuristic: during tenure change blocks, produce a fast short block to begin tenure" ) ;
2219
+ info ! ( "Nakamoto miner heuristic: during tenure change blocks, produce a fast short block to begin tenure" ) ;
2220
2220
return Ok ( ( false , tx_events) ) ;
2221
2221
}
2222
2222
}
Original file line number Diff line number Diff line change @@ -1260,6 +1260,12 @@ impl BlockMinerThread {
1260
1260
tenure_change_tx : None ,
1261
1261
} ) ;
1262
1262
} ;
1263
+ if self . last_block_mined . is_some ( ) {
1264
+ return Ok ( NakamotoTenureInfo {
1265
+ coinbase_tx : None ,
1266
+ tenure_change_tx : None ,
1267
+ } ) ;
1268
+ }
1263
1269
1264
1270
let parent_block_id = parent_block_info. stacks_parent_header . index_block_hash ( ) ;
1265
1271
let mut payload = TenureChangePayload {
@@ -1289,10 +1295,10 @@ impl BlockMinerThread {
1289
1295
& parent_block_id,
1290
1296
)
1291
1297
. map_err ( NakamotoNodeError :: MiningFailure ) ?;
1292
- debug ! ( "Miner: Extending tenure" ;
1293
- "burn_view_consensus_hash" => %burn_view_consensus_hash,
1294
- "parent_block_id" => %parent_block_id,
1295
- "num_blocks_so_far" => num_blocks_so_far,
1298
+ info ! ( "Miner: Extending tenure" ;
1299
+ "burn_view_consensus_hash" => %burn_view_consensus_hash,
1300
+ "parent_block_id" => %parent_block_id,
1301
+ "num_blocks_so_far" => num_blocks_so_far,
1296
1302
) ;
1297
1303
payload = payload. extend (
1298
1304
* burn_view_consensus_hash,
Original file line number Diff line number Diff line change @@ -6382,7 +6382,8 @@ fn continue_tenure_extend() {
6382
6382
let ( mut naka_conf, _miner_account) = naka_neon_integration_conf ( None ) ;
6383
6383
let prom_bind = format ! ( "{}:{}" , "127.0.0.1" , 6000 ) ;
6384
6384
naka_conf. node . prometheus_bind = Some ( prom_bind. clone ( ) ) ;
6385
- naka_conf. miner . wait_on_interim_blocks = Duration :: from_secs ( 1000 ) ;
6385
+ naka_conf. miner . wait_on_interim_blocks = Duration :: from_secs ( 1 ) ;
6386
+ let http_origin = naka_conf. node . data_url . clone ( ) ;
6386
6387
let sender_sk = Secp256k1PrivateKey :: new ( ) ;
6387
6388
// setup sender + recipient for a test stx transfer
6388
6389
let sender_addr = tests:: to_addr ( & sender_sk) ;
@@ -6571,12 +6572,13 @@ fn continue_tenure_extend() {
6571
6572
& signers,
6572
6573
) ;
6573
6574
6574
- wait_for ( 5 , || {
6575
+ wait_for ( 25 , || {
6575
6576
let blocks_processed = coord_channel
6576
6577
. lock ( )
6577
6578
. expect ( "Mutex poisoned" )
6578
6579
. get_stacks_blocks_processed ( ) ;
6579
- Ok ( blocks_processed > blocks_processed_before)
6580
+ let sender_nonce = get_account ( & http_origin, & to_addr ( & sender_sk) ) . nonce ;
6581
+ Ok ( blocks_processed > blocks_processed_before && sender_nonce >= 1 )
6580
6582
} )
6581
6583
. unwrap ( ) ;
6582
6584
You can’t perform that action at this time.
0 commit comments