Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skips and comments for certain mutants #4604

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added the mutants from PR #4527
  • Loading branch information
ASuciuX committed Apr 2, 2024
commit 62a7e6e4400d8f10e33085e7d19e5f810a8f747a
4 changes: 4 additions & 0 deletions libsigner/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ fn ack_dispatcher(request: HttpRequest) {
}

/// Process a stackerdb event from the node
/// TODO: #4587 create default for `SignerEvent` and `EventError`, then check if mutation tests are caught for these case:
/// Ok(Default::default())
/// Or keep the skip and remove the comment
#[cfg_attr(test, mutants::skip)]
fn process_stackerdb_event(
local_addr: Option<SocketAddr>,
mut request: HttpRequest,
Expand Down
8 changes: 8 additions & 0 deletions testnet/stacks-node/src/nakamoto_node/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,10 @@ impl BlockMinerThread {

/// Try to mine a Stacks block by assembling one from mempool transactions and sending a
/// burnchain block-commit transaction. If we succeed, then return the assembled block.
/// TODO: #4587 create default for `NakamotoBlock` and `NakamotoNodeError`, then check if mutation tests are caught for these case:
/// Ok(Default::default())
/// Or keep the skip and remove the comment
#[cfg_attr(test, mutants::skip)]
fn mine_block(&mut self, stackerdbs: &StackerDBs) -> Result<NakamotoBlock, NakamotoNodeError> {
debug!("block miner thread ID is {:?}", thread::current().id());

Expand Down Expand Up @@ -899,6 +903,10 @@ impl ParentStacksBlockInfo {
/// This is used to mitigate (but not eliminate) a TOCTTOU issue with mining: the caller's
/// conception of the sortition history tip may have become stale by the time they call this
/// method, in which case, mining should *not* happen (since the block will be invalid).
/// TODO: #4587 craete default for `NakamotoBlock` and `NakamotoNodeError`, then check if mutation tests are caught for these case:
/// Ok(Default::default())
/// Or keep the skip and remove the comment
#[cfg_attr(test, mutants::skip)]
pub fn lookup(
chain_state: &mut StacksChainState,
burn_db: &mut SortitionDB,
Expand Down