2019-03-22 20:16:44 -06:00
|
|
|
pub mod storage_contract;
|
2019-03-22 14:30:18 -06:00
|
|
|
pub mod storage_instruction;
|
2019-03-22 06:47:05 -06:00
|
|
|
pub mod storage_processor;
|
|
|
|
|
2019-05-15 13:28:56 -07:00
|
|
|
pub const SLOTS_PER_SEGMENT: u64 = 16;
|
2019-01-17 14:41:48 -08:00
|
|
|
|
2019-05-03 16:27:53 -07:00
|
|
|
pub fn get_segment_from_slot(slot: u64) -> usize {
|
2019-06-11 18:27:47 -07:00
|
|
|
((slot + (SLOTS_PER_SEGMENT - 1)) / SLOTS_PER_SEGMENT) as usize
|
2019-01-17 14:41:48 -08:00
|
|
|
}
|
|
|
|
|
2019-03-02 18:17:17 -07:00
|
|
|
const STORAGE_PROGRAM_ID: [u8; 32] = [
|
2019-04-25 17:58:49 -07:00
|
|
|
6, 162, 25, 123, 127, 68, 233, 59, 131, 151, 21, 152, 162, 120, 90, 37, 154, 88, 86, 5, 156,
|
|
|
|
221, 182, 201, 142, 103, 151, 112, 0, 0, 0, 0,
|
2018-12-04 08:20:41 -08:00
|
|
|
];
|
2019-06-06 19:27:49 -07:00
|
|
|
solana_sdk::solana_name_id!(
|
|
|
|
STORAGE_PROGRAM_ID,
|
|
|
|
"Storage111111111111111111111111111111111111"
|
|
|
|
);
|