(&mut self)
| 74 | } |
| 75 | |
| 76 | fn realloc(&mut self) -> Result<()> { |
| 77 | // Realloc memory for the thread account |
| 78 | let data_len = vec![ |
| 79 | 8, |
| 80 | size_of::<Thread>(), |
| 81 | self.id.len(), |
| 82 | self.instructions.try_to_vec()?.len(), |
| 83 | self.trigger.try_to_vec()?.len(), |
| 84 | NEXT_INSTRUCTION_SIZE, |
| 85 | ] |
| 86 | .iter() |
| 87 | .sum(); |
| 88 | self.to_account_info().realloc(data_len, false)?; |
| 89 | Ok(()) |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | /// The execution context of a particular transaction thread. |