Skip to content

Commit 48ccf9d

Browse files
committed
Comments
1 parent bacc9f0 commit 48ccf9d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

program/rust/src/rust_oracle.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ fn initialize_mapping_account(account: &AccountInfo, version: u32) -> Result<(),
275275
Ok(())
276276
}
277277

278+
/// Mutably borrow the data in `account` as a product account, validating that the account
279+
/// is properly formatted. Any mutations to the returned value will be reflected in the
280+
/// account data. Use this to read already-initialized accounts.
278281
fn load_product_account_mut<'a>(
279282
account: &'a AccountInfo,
280283
expected_version: u32,
@@ -291,6 +294,7 @@ fn load_product_account_mut<'a>(
291294
Ok(product_data)
292295
}
293296

297+
// Assign pubkey bytes from source to target, fails if source is not 32 bytes
294298
fn pubkey_assign(mut target: pc_pub_key_t, source: &[u8]) {
295299
unsafe { target.k1_.copy_from_slice(source) }
296300
}

0 commit comments

Comments
 (0)