Eliminate doc warnings and fix some markdown (#18566)
* Fix link target in doc comment * Fix formatting of log examples in process_instruction * Fix doc markdown in solana-gossip * Fix doc markdown in solana-runtime * Escape square braces in doc comments to avoid warnings * Surround 'account references' doc items in code spans to avoid warnings * Fix code block in loader_upgradeable_instruction * Fix doctest for loader_upgradable_instruction
This commit is contained in:
@@ -15,16 +15,16 @@ pub enum UpgradeableLoaderInstruction {
|
||||
/// Otherwise another party may initialize the account.
|
||||
///
|
||||
/// # Account references
|
||||
/// 0. [writable] source account to initialize.
|
||||
/// 1. [] Buffer authority, optional, if omitted then the buffer will be
|
||||
/// 0. `[writable]` source account to initialize.
|
||||
/// 1. `[]` Buffer authority, optional, if omitted then the buffer will be
|
||||
/// immutable.
|
||||
InitializeBuffer,
|
||||
|
||||
/// Write program data into a Buffer account.
|
||||
///
|
||||
/// # Account references
|
||||
/// 0. [writable] Buffer account to write program data to.
|
||||
/// 1. [signer] Buffer authority
|
||||
/// 0. `[writable]` Buffer account to write program data to.
|
||||
/// 1. `[signer]` Buffer authority
|
||||
Write {
|
||||
/// Offset at which to write the given bytes.
|
||||
offset: u32,
|
||||
@@ -46,10 +46,15 @@ pub enum UpgradeableLoaderInstruction {
|
||||
/// The ProgramData address is derived from the Program account's address as
|
||||
/// follows:
|
||||
///
|
||||
/// `let (program_data_address, _) = Pubkey::find_program_address(
|
||||
/// ```
|
||||
/// # use solana_program::pubkey::Pubkey;
|
||||
/// # use solana_program::bpf_loader_upgradeable;
|
||||
/// # let program_address = &[];
|
||||
/// let (program_data_address, _) = Pubkey::find_program_address(
|
||||
/// &[program_address],
|
||||
/// &bpf_loader_upgradeable::id()
|
||||
/// );`
|
||||
/// );
|
||||
/// ```
|
||||
///
|
||||
/// The `DeployWithMaxDataLen` instruction does not require the ProgramData
|
||||
/// account be a signer and therefore MUST be included within the same
|
||||
@@ -58,17 +63,17 @@ pub enum UpgradeableLoaderInstruction {
|
||||
/// account.
|
||||
///
|
||||
/// # Account references
|
||||
/// 0. [signer] The payer account that will pay to create the ProgramData
|
||||
/// 0. `[signer]` The payer account that will pay to create the ProgramData
|
||||
/// account.
|
||||
/// 1. [writable] The uninitialized ProgramData account.
|
||||
/// 2. [writable] The uninitialized Program account.
|
||||
/// 3. [writable] The Buffer account where the program data has been
|
||||
/// 1. `[writable]` The uninitialized ProgramData account.
|
||||
/// 2. `[writable]` The uninitialized Program account.
|
||||
/// 3. `[writable]` The Buffer account where the program data has been
|
||||
/// written. The buffer account's authority must match the program's
|
||||
/// authority
|
||||
/// 4. [] Rent sysvar.
|
||||
/// 5. [] Clock sysvar.
|
||||
/// 6. [] System program (`solana_sdk::system_program::id()`).
|
||||
/// 7. [signer] The program's authority
|
||||
/// 4. `[]` Rent sysvar.
|
||||
/// 5. `[]` Clock sysvar.
|
||||
/// 6. `[]` System program (`solana_sdk::system_program::id()`).
|
||||
/// 7. `[signer]` The program's authority
|
||||
DeployWithMaxDataLen {
|
||||
/// Maximum length that the program can be upgraded to.
|
||||
max_data_len: usize,
|
||||
@@ -85,15 +90,15 @@ pub enum UpgradeableLoaderInstruction {
|
||||
/// balance at zero.
|
||||
///
|
||||
/// # Account references
|
||||
/// 0. [writable] The ProgramData account.
|
||||
/// 1. [writable] The Program account.
|
||||
/// 2. [writable] The Buffer account where the program data has been
|
||||
/// 0. `[writable]` The ProgramData account.
|
||||
/// 1. `[writable]` The Program account.
|
||||
/// 2. `[writable]` The Buffer account where the program data has been
|
||||
/// written. The buffer account's authority must match the program's
|
||||
/// authority
|
||||
/// 3. [writable] The spill account.
|
||||
/// 4. [] Rent sysvar.
|
||||
/// 5. [] Clock sysvar.
|
||||
/// 6. [signer] The program's authority.
|
||||
/// 3. `[writable]` The spill account.
|
||||
/// 4. `[]` Rent sysvar.
|
||||
/// 5. `[]` Clock sysvar.
|
||||
/// 6. `[signer]` The program's authority.
|
||||
Upgrade,
|
||||
|
||||
/// Set a new authority that is allowed to write the buffer or upgrade the
|
||||
|
Reference in New Issue
Block a user