Move accounts back to lib.rs as associated breaks otherwise.

Change-Id: Ic4e7cddaaac414cbc9afb5eee4e8a9c81b2f8548
This commit is contained in:
Reisen 2021-05-03 23:59:02 +00:00
parent 569ecab2eb
commit c4286b9df5
2 changed files with 18 additions and 23 deletions

View File

@ -1,20 +0,0 @@
use anchor_lang::{prelude::*, solana_program};
use crate::{types::Index, MAX_LEN_GUARDIAN_KEYS};
#[account]
pub struct BridgeInfo {}
#[account]
pub struct GuardianSetInfo {
/// Version number of this guardian set.
pub index: Index,
/// Number of keys stored
pub len_keys: u8,
/// public key hashes of the guardian set
pub keys: [[u8; 20]; MAX_LEN_GUARDIAN_KEYS],
/// creation time
pub creation_time: u32,
/// expiration time when VAAs issued by this set are no longer valid
pub expiration_time: u32,
}

View File

@ -1,11 +1,9 @@
use anchor_lang::{prelude::*, solana_program};
mod account;
mod api;
mod types;
use account::{BridgeInfo, GuardianSetInfo};
use types::BridgeConfig;
use types::{Index, BridgeConfig};
/// An enum with labeled network identifiers. These must be consistent accross all wormhole
/// contracts deployed on each chain.
@ -156,3 +154,20 @@ pub enum ErrorCode {
#[msg("System account pubkey did not match expected address.")]
InvalidSysVar,
}
#[account]
pub struct BridgeInfo {}
#[account]
pub struct GuardianSetInfo {
/// Version number of this guardian set.
pub index: Index,
/// Number of keys stored
pub len_keys: u8,
/// public key hashes of the guardian set
pub keys: [[u8; 20]; MAX_LEN_GUARDIAN_KEYS],
/// creation time
pub creation_time: u32,
/// expiration time when VAAs issued by this set are no longer valid
pub expiration_time: u32,
}