Skip to content

Commit 1f33bd0

Browse files
authored
Merge pull request #5921 from fdefelici/fix/avoid-mock-mine-no-utxo-log
avoid "No UTXOs" warn log when in mock_mining mode
2 parents 3770e2a + f0eeb42 commit 1f33bd0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to the versioning scheme outlined in the [README.md](RE
1414

1515
- When a miner times out waiting for signatures, it will re-propose the same block instead of building a new block ([#5877](https://github.com/stacks-network/stacks-core/pull/5877))
1616
- Improve tenure downloader trace verbosity applying proper logging level depending on the tenure state ("debug" if unconfirmed, "info" otherwise) ([#5871](https://github.com/stacks-network/stacks-core/issues/5871))
17+
- Remove warning log about missing UTXOs when a node is configured as `miner` with `mock_mining` mode enabled ([#5841](https://github.com/stacks-network/stacks-core/issues/5841))
1718

1819
## [3.1.0.0.7]
1920

testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,6 @@ impl BitcoinRegtestController {
744744
utxos_to_exclude: Option<UTXOSet>,
745745
block_height: u64,
746746
) -> Option<UTXOSet> {
747-
// if mock mining, do not even bother requesting UTXOs
748-
if self.config.get_node_config(false).mock_mining {
749-
return None;
750-
}
751-
752747
let pubk = if self.config.miner.segwit && epoch_id >= StacksEpochId::Epoch21 {
753748
let mut p = *public_key;
754749
p.set_compressed(true);
@@ -1693,6 +1688,11 @@ impl BitcoinRegtestController {
16931688
// in RBF, you have to consume the same UTXOs
16941689
utxos
16951690
} else {
1691+
// if mock mining, do not even bother requesting UTXOs
1692+
if self.config.node.mock_mining {
1693+
return Err(BurnchainControllerError::NoUTXOs);
1694+
}
1695+
16961696
// Fetch some UTXOs
16971697
let addr = self.get_miner_address(epoch_id, public_key);
16981698
match self.get_utxos(

0 commit comments

Comments
 (0)