mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-13 23:16:52 +00:00
automations
This commit is contained in:
@@ -117,7 +117,8 @@ pub fn process_deploy(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResul
|
||||
.assert_mut(|m| {
|
||||
if let Some(automation) = &automation {
|
||||
// only run automation once per round
|
||||
m.authority == automation.authority && m.round_id < board.id
|
||||
m.authority == automation.authority
|
||||
&& (m.round_id < board.id || board.slot_hash != [0; 32])
|
||||
} else {
|
||||
m.authority == *signer_info.key
|
||||
}
|
||||
@@ -169,7 +170,7 @@ pub fn process_deploy(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResul
|
||||
|
||||
// Update square
|
||||
if is_first_move {
|
||||
square.miners[square_id][square.count[square_id] as usize] = *signer_info.key;
|
||||
square.miners[square_id][square.count[square_id] as usize] = miner.authority;
|
||||
square.count[square_id] += 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
use solana_program::pubkey;
|
||||
use steel::*;
|
||||
|
||||
pub const AUTHORIZED_ACCOUNTS: [Pubkey; 3] = [
|
||||
pub const AUTHORIZED_ACCOUNTS: [Pubkey; 4] = [
|
||||
pubkey!("pqspJ298ryBjazPAr95J9sULCVpZe3HbZTWkbC1zrkS"),
|
||||
pubkey!("HNWhK5f8RMWBqcA7mXJPaxdTPGrha3rrqUrri7HSKb3T"),
|
||||
pubkey!("6B9PjpHfbhPcSakS5UQ7ZctgbPujfsryVRpDecskGLiz"),
|
||||
pubkey!("HBUh9g46wk2X89CvaNN15UmsznP59rh6od1h8JwYAopk"),
|
||||
// pubkey!("By5JFFueXCqeqLk5MzR8ZSwFxASz3SKWX2TVfT1LTFbX"),
|
||||
|
||||
Reference in New Issue
Block a user