Skip to content

Commit de2e88e

Browse files
committed
fix: remove comments & debugging log
1 parent 94a0039 commit de2e88e

File tree

2 files changed

+0
-96
lines changed

2 files changed

+0
-96
lines changed

stackslib/src/chainstate/stacks/boot/pox_4_tests.rs

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -8435,8 +8435,6 @@ pub fn prepare_pox4_test<'a>(
84358435
.map(|key| TestStacker {
84368436
signer_private_key: key.clone(),
84378437
stacker_private_key: key.clone(),
8438-
// amount: u64::MAX as u128 - 10000,
8439-
// amount: 2048000 * POX_THRESHOLD_STEPS_USTX * 2,
84408438
amount: 1024 * POX_THRESHOLD_STEPS_USTX,
84418439
pox_addr: Some(pox_addr_from(&key)),
84428440
max_amount: None,
@@ -8466,7 +8464,6 @@ pub fn prepare_pox4_test<'a>(
84668464

84678465
info!("---- Booting into Nakamoto Peer ----");
84688466
let peer = boot_plan.boot_into_nakamoto_peer(vec![], observer);
8469-
// let mut blocks = vec![];
84708467
let sort_db = peer.sortdb.as_ref().unwrap();
84718468
let latest_block = sort_db
84728469
.index_handle_at_tip()
@@ -8489,8 +8486,6 @@ pub fn prepare_pox4_test<'a>(
84898486
test_signers,
84908487
)
84918488
} else {
8492-
// assert_eq!(burnchain.pox_constants.reward_slots(), 6);
8493-
84948489
// Advance into pox4
84958490
let target_height = burnchain.pox_constants.pox_4_activation_height;
84968491
let mut coinbase_nonce = 0;
@@ -8512,81 +8507,6 @@ pub fn prepare_pox4_test<'a>(
85128507
coinbase_nonce,
85138508
TestSigners::new(vec![]),
85148509
)
8515-
// let target_epoch = if use_nakamoto {
8516-
// StacksEpochId::Epoch30
8517-
// } else {
8518-
// StacksEpochId::Epoch25
8519-
// };
8520-
// let height_25 = epochs
8521-
// .iter()
8522-
// .find(|e| e.epoch_id == StacksEpochId::Epoch25)
8523-
// .unwrap()
8524-
// .start_height;
8525-
// // let height_25 = epochs.iter().find(|e| e.epoch_id == StacksEpochId::Epoch25).unwrap().start_height;
8526-
// let target_height = epochs
8527-
// .iter()
8528-
// .find(|e| e.epoch_id == target_epoch)
8529-
// .unwrap()
8530-
// .start_height;
8531-
// let mut latest_block = peer.tenure_with_txs(&[], &mut coinbase_nonce);
8532-
// if use_nakamoto {
8533-
// // Go to 2.5, stack, then 3.0
8534-
// while get_tip(peer.sortdb.as_ref()).block_height < height_25 {
8535-
// latest_block = peer.tenure_with_txs(&[], &mut coinbase_nonce);
8536-
// }
8537-
8538-
// let tip = get_tip(peer.sortdb.as_ref());
8539-
// let reward_cycle = peer.get_reward_cycle() as u128;
8540-
8541-
// let min_ustx = with_sortdb(&mut peer, |chainstate, sortdb| {
8542-
// chainstate.get_stacking_minimum(sortdb, &latest_block)
8543-
// })
8544-
// .unwrap();
8545-
// info!("Building stacking txs");
8546-
// // Make all the test Stackers stack
8547-
// let stack_txs: Vec<_> = test_stackers
8548-
// .clone()
8549-
// .iter()
8550-
// .map(|test_stacker| {
8551-
// info!(
8552-
// "Making PoX-4 lockup for {}; {}",
8553-
// test_stacker.amount,
8554-
// test_stacker.amount > min_ustx
8555-
// );
8556-
// let pox_addr = test_stacker.pox_addr.clone().unwrap();
8557-
// let max_amount = test_stacker.max_amount.unwrap_or(u128::MAX);
8558-
// let signature = make_signer_key_signature(
8559-
// &pox_addr,
8560-
// &test_stacker.signer_private_key,
8561-
// reward_cycle.into(),
8562-
// &crate::util_lib::signed_structured_data::pox4::Pox4SignatureTopic::StackStx,
8563-
// 12_u128,
8564-
// max_amount,
8565-
// 1,
8566-
// );
8567-
// make_pox_4_lockup(
8568-
// &test_stacker.stacker_private_key,
8569-
// 0,
8570-
// test_stacker.amount,
8571-
// &pox_addr,
8572-
// 12,
8573-
// &StacksPublicKey::from_private(&test_stacker.signer_private_key),
8574-
// tip.block_height,
8575-
// Some(signature),
8576-
// max_amount,
8577-
// 1,
8578-
// )
8579-
// })
8580-
// .collect();
8581-
// latest_block = peer.tenure_with_txs(&stack_txs, &mut coinbase_nonce);
8582-
// }
8583-
// while get_tip(peer.sortdb.as_ref()).block_height < u64::from(target_height) {
8584-
// latest_block = peer.tenure_with_txs(&[], &mut coinbase_nonce);
8585-
// // if we reach epoch 2.1, perform the check
8586-
// // if get_tip(peer.sortdb.as_ref()).block_height > epochs[3].start_height {
8587-
// // assert_latest_was_burn(&mut peer);
8588-
// // }
8589-
// }
85908510
}
85918511
}
85928512

stackslib/src/net/tests/mod.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -474,17 +474,6 @@ impl NakamotoBootPlan {
474474
.block_height_to_reward_cycle(sortition_height.into())
475475
.unwrap();
476476

477-
let sortdb = peer.sortdb();
478-
let tip = SortitionDB::get_canonical_burn_chain_tip(&sortdb.conn()).unwrap();
479-
let tip_index_block = tip.get_canonical_stacks_block_id();
480-
481-
let min_ustx = with_sortdb(peer, |chainstate, sortdb| {
482-
chainstate.get_stacking_minimum(sortdb, &tip_index_block)
483-
})
484-
.unwrap();
485-
486-
info!("Minimum USTX for stacking: {}", min_ustx);
487-
488477
// Make all the test Stackers stack
489478
let stack_txs: Vec<_> = peer
490479
.config
@@ -493,11 +482,6 @@ impl NakamotoBootPlan {
493482
.unwrap_or(vec![])
494483
.iter()
495484
.map(|test_stacker| {
496-
info!(
497-
"Making PoX-4 lockup for {}; {}",
498-
test_stacker.amount,
499-
test_stacker.amount > min_ustx
500-
);
501485
let pox_addr = test_stacker
502486
.pox_addr
503487
.clone()

0 commit comments

Comments
 (0)