Skip to content

Commit 43abd9e

Browse files
committed
test: fix pox_2_contract_caller_units test
1 parent a17d1df commit 43abd9e

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,33 +667,40 @@ fn pox_2_contract_caller_units() {
667667

668668
let expected_unlock_height = POX_TESTNET_CYCLE_LENGTH * 4;
669669

670+
let mut store = MemoryBackingStore::new();
671+
let mut analysis_db = store.as_analysis_db();
672+
analysis_db.begin();
673+
670674
// execute past 2.1 epoch initialization
671675
sim.execute_next_block(|_env| {});
672676
sim.execute_next_block(|_env| {});
673677
sim.execute_next_block(|_env| {});
674678

675679
sim.execute_next_block(|env| {
676-
env.initialize_versioned_contract(
680+
env.initialize_versioned_contract_with_db(
677681
POX_2_CONTRACT_TESTNET.clone(),
678682
ClarityVersion::Clarity2,
679683
&POX_2_TESTNET_CODE,
680684
None,
681685
ASTRules::PrecheckSize,
686+
&mut analysis_db,
682687
)
683688
.unwrap()
684689
});
685690

686691
let cc = boot_code_id("stack-through", false);
687692

688693
sim.execute_next_block(|env| {
689-
env.initialize_contract(cc.clone(),
694+
env.initialize_contract_with_db(cc.clone(),
690695
"(define-public (cc-stack-stx (amount-ustx uint)
691696
(pox-addr (tuple (version (buff 1)) (hashbytes (buff 32))))
692697
(start-burn-ht uint)
693698
(lock-period uint))
694699
(contract-call? .pox-2 stack-stx amount-ustx pox-addr start-burn-ht lock-period))",
695-
None,
696-
ASTRules::PrecheckSize)
700+
None,
701+
ASTRules::PrecheckSize,
702+
&mut analysis_db,
703+
)
697704
.unwrap();
698705

699706
let burn_height = env.eval_raw("burn-block-height").unwrap().0;

0 commit comments

Comments
 (0)