Skip to content

Commit 3aa0884

Browse files
committed
fix: tests
1 parent 086bcb8 commit 3aa0884

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test-integration/test-committor-service/tests/test_ix_commit_local.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::{
44
time::{Duration, Instant},
55
};
66

7+
use borsh::to_vec;
78
use log::*;
89
use magicblock_committor_service::{
910
config::ChainConfig,
@@ -18,6 +19,7 @@ use magicblock_program::magic_scheduled_base_intent::{
1819
ScheduledBaseIntent, UndelegateType,
1920
};
2021
use magicblock_rpc_client::MagicblockRpcClient;
22+
use program_flexi_counter::state::FlexiCounter;
2123
use solana_account::{Account, ReadableAccount};
2224
use solana_pubkey::Pubkey;
2325
use solana_rpc_client::nonblocking::rpc_client::RpcClient;
@@ -114,8 +116,16 @@ async fn commit_single_account(
114116
let (pubkey, mut account) =
115117
init_and_delegate_account_on_chain(&counter_auth, bytes as u64, None)
116118
.await;
119+
120+
let counter = FlexiCounter {
121+
label: "Counter".to_string(),
122+
updates: 0,
123+
count: 101,
124+
};
125+
let mut data = to_vec(&counter).unwrap();
126+
data.resize(bytes, 0);
127+
account.data = data;
117128
account.owner = program_flexi_counter::id();
118-
account.data = vec![101_u8; bytes];
119129

120130
let account = CommittedAccount { pubkey, account };
121131
let base_intent = if undelegate {

0 commit comments

Comments
 (0)