(client: &Client, id: String)
| 72 | } |
| 73 | |
| 74 | pub fn pause(client: &Client, id: String) -> Result<(), CliError> { |
| 75 | let thread_pubkey = Thread::pubkey(client.payer_pubkey(), id.into_bytes()); |
| 76 | let ix = Instruction { |
| 77 | program_id: clockwork_thread_program::ID, |
| 78 | accounts: clockwork_thread_program::accounts::ThreadPause { |
| 79 | authority: client.payer_pubkey(), |
| 80 | thread: thread_pubkey, |
| 81 | }.to_account_metas(Some(false)), |
| 82 | data: clockwork_thread_program::instruction::ThreadPause {}.data(), |
| 83 | }; |
| 84 | client.send_and_confirm(&[ix], &[client.payer()]).unwrap(); |
| 85 | get(client, thread_pubkey)?; |
| 86 | Ok(()) |
| 87 | } |
| 88 | |
| 89 | pub fn resume(client: &Client, id: String) -> Result<(), CliError> { |
| 90 | let thread_pubkey = Thread::pubkey(client.payer_pubkey(), id.into_bytes()); |
no test coverage detected