@@ -41,6 +41,7 @@ use stacks::chainstate::stacks::{
41
41
TenureChangeCause , TenureChangePayload , TransactionAnchorMode , TransactionPayload ,
42
42
TransactionVersion ,
43
43
} ;
44
+ use stacks:: core:: mempool:: MemPoolWalkStrategy ;
44
45
use stacks:: net:: api:: poststackerdbchunk:: StackerDBErrorCodes ;
45
46
use stacks:: net:: p2p:: NetworkHandle ;
46
47
use stacks:: net:: stackerdb:: StackerDBs ;
@@ -618,7 +619,13 @@ impl BlockMinerThread {
618
619
"Miner did not find any transactions to mine, sleeping for {:?}" ,
619
620
self . config. miner. empty_mempool_sleep_time
620
621
) ;
621
- self . reset_nonce_cache = false ;
622
+ // For NextNonceWithHighestFeeRate strategy, keep reset_nonce_cache = true
623
+ // to ensure considered_txs table is cleared for each block attempt
624
+ if self . config . miner . mempool_walk_strategy
625
+ != MemPoolWalkStrategy :: NextNonceWithHighestFeeRate
626
+ {
627
+ self . reset_nonce_cache = false ;
628
+ }
622
629
623
630
// Pause the miner to wait for transactions to arrive
624
631
let now = Instant :: now ( ) ;
@@ -733,7 +740,13 @@ impl BlockMinerThread {
733
740
) ;
734
741
735
742
// We successfully mined, so the mempool caches are valid.
736
- self . reset_nonce_cache = false ;
743
+ // For NextNonceWithHighestFeeRate strategy, keep reset_nonce_cache = true
744
+ // to ensure considered_txs table is cleared for each block attempt
745
+ if self . config . miner . mempool_walk_strategy
746
+ != MemPoolWalkStrategy :: NextNonceWithHighestFeeRate
747
+ {
748
+ self . reset_nonce_cache = false ;
749
+ }
737
750
}
738
751
739
752
// update mined-block counters and mined-tenure counters
0 commit comments