Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/stacks-network/stacks-core
Browse files Browse the repository at this point in the history
… into chore/fix-multiple-miners
  • Loading branch information
jferrant committed Sep 25, 2024
2 parents 9360397 + 447bb15 commit 369bc78
Show file tree
Hide file tree
Showing 8 changed files with 764 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
- tests::signer::v0::partial_tenure_fork
- tests::signer::v0::mine_2_nakamoto_reward_cycles
- tests::signer::v0::signer_set_rollover
- tests::nakamoto_integrations::stack_stx_burn_op_integration_test
- tests::nakamoto_integrations::burn_ops_integration_test
- tests::nakamoto_integrations::check_block_heights
- tests::nakamoto_integrations::clarity_burn_state
- tests::nakamoto_integrations::check_block_times
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"lldb.adapterType": "native",
"lldb.launch.sourceLanguages": ["rust"]
"lldb.launch.sourceLanguages": ["rust"],
"rust-analyzer.runnables.extraEnv": {
"BITCOIND_TEST": "1"
}
}
7 changes: 4 additions & 3 deletions pox-locking/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ fn create_event_info_data_code(
// If a given burn block height is in a prepare phase, then the stacker will be in the _next_ reward cycle, so bump the cycle by 1
// `prepare_offset` is 1 or 0, depending on whether current execution is in a prepare phase or not
//
// "is-in-next-pox-set" == effective-height <= (reward-length - prepare-length)
// "<=" since the txs of the first block of the prepare phase are considered in the pox-set
// "is-in-next-pox-set" == effective-height < (cycle-length - prepare-length)
// "<" since the txs of the first block of the prepare phase are NOT considered in the pox-set,
// the pox-set is locked in the first block of the prepare phase, before the transactions of that block are run.
let pox_set_offset = r#"
(pox-set-offset (if (<=
(pox-set-offset (if (<
(mod (- %height% (var-get first-burnchain-block-height)) (var-get pox-reward-cycle-length))
(- (var-get pox-reward-cycle-length) (var-get pox-prepare-cycle-length))
) u0 u1))
Expand Down
Loading

0 comments on commit 369bc78

Please sign in to comment.