Skip to content

Commit 8d37406

Browse files
committed
reverted old code
1 parent 165399f commit 8d37406

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

stacks-node/src/tests/nakamoto_integrations.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12647,11 +12647,6 @@ fn test_sip_031_activation() {
1264712647
return;
1264812648
}
1264912649

12650-
// skip the test til we move to epoch 3.2
12651-
if StacksEpochId::latest() != StacksEpochId::Epoch32 {
12652-
//return;
12653-
}
12654-
1265512650
let (mut naka_conf, _miner_account) = naka_neon_integration_conf(None);
1265612651
naka_conf.node.pox_sync_sample_secs = 180;
1265712652
naka_conf.burnchain.max_rbf = 10_000_000;
@@ -12764,11 +12759,6 @@ fn test_sip_031_activation() {
1276412759
{
1276512760
break;
1276612761
}
12767-
12768-
for block in test_observer::get_blocks().iter().rev() {
12769-
println!("BLOCK {:?}", block);
12770-
//let events = block.get("events").unwrap().as_array().unwrap();
12771-
}
1277212762
}
1277312763

1277412764
info!(

stackslib/src/chainstate/nakamoto/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -713,15 +713,15 @@ fn get_sip_031_emission_schedule(mainnet: bool) -> Vec<SIP031EmissionInterval> {
713713
impl SIP031EmissionInterval {
714714
/// Look up the amount of STX to emit at the start of the tenure at the specified height.
715715
/// Precondition: `intervals` must be sorted in descending order by `start_height`
716-
pub fn get_sip_031_emission_at_height(height: u64, mainnet: bool) -> u128 {
716+
pub fn get_sip_031_emission_at_height(burn_height: u64, mainnet: bool) -> u128 {
717717
let intervals = get_sip_031_emission_schedule(mainnet);
718718

719719
if intervals.is_empty() {
720720
return 0;
721721
}
722722

723723
for interval in intervals {
724-
if height >= interval.start_height {
724+
if burn_height >= interval.start_height {
725725
return interval.amount;
726726
}
727727
}
@@ -732,11 +732,11 @@ impl SIP031EmissionInterval {
732732

733733
/// Verify that a list of intervals is sorted in descending order by `start_height`
734734
pub fn check_inversed_order(intervals: &[SIP031EmissionInterval]) -> bool {
735-
if intervals.len() < 2 {
735+
let Some(mut ht) = intervals.first().map(|x| x.start_height) else {
736+
// if the interval list is empty, its sorted
736737
return true;
737-
}
738+
};
738739

739-
let mut ht = intervals[0].start_height;
740740
for interval in intervals.iter().skip(1) {
741741
if interval.start_height > ht {
742742
return false;
@@ -4216,8 +4216,6 @@ impl NakamotoChainState {
42164216
"parent_header_hash" => %parent_header_hash,
42174217
);
42184218

4219-
let evaluated_epoch = clarity_tx.get_epoch();
4220-
42214219
if new_tenure {
42224220
clarity_tx
42234221
.connection()
@@ -4239,6 +4237,8 @@ impl NakamotoChainState {
42394237
})?;
42404238
}
42414239

4240+
let evaluated_epoch = clarity_tx.get_epoch();
4241+
42424242
let auto_unlock_events = if evaluated_epoch >= StacksEpochId::Epoch21 {
42434243
let unlock_events = StacksChainState::check_and_handle_reward_start(
42444244
burn_header_height.into(),

stackslib/src/core/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ pub const BITCOIN_MAINNET_STACKS_30_BURN_HEIGHT: u64 = 867_867;
105105
/// This is Epoch-3.1, activation height proposed in SIP-029
106106
pub const BITCOIN_MAINNET_STACKS_31_BURN_HEIGHT: u64 = 875_000;
107107
/// This is Epoch-3.2, activation height proposed in SIP-031 (placeholder for now)
108-
pub const BITCOIN_MAINNET_STACKS_32_BURN_HEIGHT: u64 = u64::MAX;
108+
pub const BITCOIN_MAINNET_STACKS_32_BURN_HEIGHT: u64 = 907_740;
109109

110110
/// Bitcoin mainline testnet3 activation heights.
111111
/// TODO: No longer used since testnet3 is dead, so remove.

0 commit comments

Comments
 (0)