Skip to content

Commit

Permalink
chore: add default activation for pox-3 and pox-4
Browse files Browse the repository at this point in the history
  • Loading branch information
friedger committed Feb 13, 2024
1 parent 374b404 commit 967e744
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions tests/integration/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ export const DEFAULT_EPOCH_TIMELINE = {
pox_2_activation: Constants.DEVNET_DEFAULT_POX_2_ACTIVATION,
epoch_2_2: Constants.DEVNET_DEFAULT_EPOCH_2_2,
epoch_2_3: Constants.DEVNET_DEFAULT_EPOCH_2_3,
pox_3_activation: Constants.DEVNET_DEFAULT_POX_3_ACTIVATION,
epoch_2_4: Constants.DEVNET_DEFAULT_EPOCH_2_4,
epoch_2_5: Constants.DEVNET_DEFAULT_EPOCH_2_5,
pox_4_activation: Constants.DEVNET_DEFAULT_POX_4_ACTIVATION,
epoch_3_0: Constants.DEVNET_DEFAULT_EPOCH_3_0,
};

Expand Down Expand Up @@ -88,6 +90,9 @@ function fillTimeline(timeline: EpochTimeline) {
timeline.epoch_2_3 += POX_CYCLE_LENGTH;
}
}
if (timeline.pox_3_activation === undefined) {
timeline.pox_3_activation = timeline.epoch_2_3 + 1;
}
if (timeline.epoch_2_4 === undefined) {
timeline.epoch_2_4 = DEFAULT_EPOCH_TIMELINE.epoch_2_4;
while (timeline.epoch_2_4 <= timeline.epoch_2_3) {
Expand All @@ -100,6 +105,9 @@ function fillTimeline(timeline: EpochTimeline) {
timeline.epoch_2_5 += POX_CYCLE_LENGTH;
}
}
if (timeline.pox_4_activation === undefined) {
timeline.pox_4_activation = timeline.epoch_2_5 + 1;
}
if (timeline.epoch_3_0 === undefined) {
timeline.epoch_3_0 = DEFAULT_EPOCH_TIMELINE.epoch_2_5;
while (timeline.epoch_3_0 <= timeline.epoch_2_5) {
Expand Down
6 changes: 2 additions & 4 deletions tests/testnet/next-cycle.spec.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import { StacksTestnet } from "@stacks/network";
import { Accounts } from "../integration/constants";
import { getChainInfo } from "../integration/helpers";
import {
broadcastStackExtend,
broadcastStackIncrease,
} from "../integration/pox/helpers-direct-stacking";
import { Accounts } from "../integration/constants";
import {
broadcastDelegateSTX,
broadcastDelegateStackExtend,
broadcastDelegateStackIncrease,
broadcastDelegateStackSTX,
broadcastRevokeDelegateStx,
broadcastStackAggregationCommitIndexed,
broadcastRevokeDelegateStx
} from "../integration/pox/helpers-pooled-stacking";
import { getPoxInfo } from "../integration/pox/helpers";

describe("stack-increase", async () => {
const fee = 1000;
Expand Down

0 comments on commit 967e744

Please sign in to comment.