This commit is contained in:
Hardhat Chad
2024-02-14 18:30:51 +00:00
parent bbc1d835ea
commit 25c2b17ee9
21 changed files with 670 additions and 45 deletions

View File

@@ -74,7 +74,7 @@ async fn test_reset() {
for i in 0..BUS_COUNT {
let bus_account = banks.get_account(bus_pdas[i].0).await.unwrap().unwrap();
assert_eq!(bus_account.owner, ore::id());
let bus = bytemuck::try_from_bytes::<Bus>(&bus_account.data).unwrap();
let bus = Bus::try_from_bytes(&bus_account.data).unwrap();
println!(
"Bus {:?} {:?} {:?}",
bus_pdas[i].0,
@@ -89,7 +89,7 @@ async fn test_reset() {
// Test treasury state
let treasury_account = banks.get_account(treasury_pda.0).await.unwrap().unwrap();
assert_eq!(treasury_account.owner, ore::id());
let treasury = bytemuck::try_from_bytes::<Treasury>(&treasury_account.data).unwrap();
let treasury = Treasury::try_from_bytes(&treasury_account.data).unwrap();
assert_eq!(treasury.bump as u8, treasury_pda.1);
assert_eq!(
treasury.admin,