We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
stacks-inspect try-mine
1 parent 1767ee0 commit 1eef7e8Copy full SHA for 1eef7e8
stackslib/src/cli.rs
@@ -443,6 +443,15 @@ pub fn command_try_mine(argv: &[String], conf: Option<&Config>) {
443
.unwrap_or_else(|e| panic!("Error looking up chain tip: {e}"))
444
.expect("No chain tip found");
445
446
+ // Fail if Nakamoto chainstate detected. `try-mine` cannot mine Nakamoto blocks yet
447
+ // TODO: Add Nakamoto block support
448
+ if matches!(
449
+ &tip_header.anchored_header,
450
+ StacksBlockHeaderTypes::Nakamoto(..)
451
+ ) {
452
+ panic!("Attempting to mine Nakamoto block. Nakamoto blocks not supported yet!");
453
+ };
454
+
455
let sk = StacksPrivateKey::new();
456
let mut tx_auth = TransactionAuth::from_p2pkh(&sk).unwrap();
457
tx_auth.set_origin_nonce(0);
0 commit comments