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

feat: Add --reset-tenure flag to try-mine #5608

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions stackslib/src/chainstate/nakamoto/miner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ use crate::util_lib::boot::boot_code_id;
use crate::util_lib::db::Error as DBError;

/// Nakamaoto tenure information
#[derive(Debug)]
#[derive(Debug, Default)]
pub struct NakamotoTenureInfo {
/// Coinbase tx, if this is a new tenure
pub coinbase_tx: Option<StacksTransaction>,
Expand All @@ -98,8 +98,8 @@ impl NakamotoTenureInfo {
pub fn cause(&self) -> Option<TenureChangeCause> {
self.tenure_change_tx
.as_ref()
.map(|tx| tx.try_as_tenure_change().map(|payload| payload.cause))
.flatten()
.map(|tx| tx.try_as_tenure_change())?
.map(|payload| payload.cause)
}

pub fn tenure_change_tx(&self) -> Option<&StacksTransaction> {
Expand Down
Loading
Loading