Fix example mock Signer API in solana-program (#23911)
This commit is contained in:
parent
55d61023f7
commit
492c54a28f
|
@ -77,15 +77,17 @@ pub mod solana_sdk {
|
||||||
pub fn new() -> Keypair {
|
pub fn new() -> Keypair {
|
||||||
Keypair
|
Keypair
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn pubkey(&self) -> Pubkey {
|
impl Signer for Keypair {
|
||||||
|
fn pubkey(&self) -> Pubkey {
|
||||||
Pubkey::default()
|
Pubkey::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Signer for Keypair {}
|
pub trait Signer {
|
||||||
|
fn pubkey(&self) -> Pubkey;
|
||||||
pub trait Signer {}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod signers {
|
pub mod signers {
|
||||||
|
|
|
@ -164,7 +164,7 @@ impl Message {
|
||||||
/// instruction::Instruction,
|
/// instruction::Instruction,
|
||||||
/// message::Message,
|
/// message::Message,
|
||||||
/// pubkey::Pubkey,
|
/// pubkey::Pubkey,
|
||||||
/// signature::Keypair,
|
/// signature::{Keypair, Signer},
|
||||||
/// transaction::Transaction,
|
/// transaction::Transaction,
|
||||||
/// };
|
/// };
|
||||||
///
|
///
|
||||||
|
@ -235,7 +235,7 @@ impl Message {
|
||||||
/// instruction::Instruction,
|
/// instruction::Instruction,
|
||||||
/// message::Message,
|
/// message::Message,
|
||||||
/// pubkey::Pubkey,
|
/// pubkey::Pubkey,
|
||||||
/// signature::Keypair,
|
/// signature::{Keypair, Signer},
|
||||||
/// transaction::Transaction,
|
/// transaction::Transaction,
|
||||||
/// };
|
/// };
|
||||||
///
|
///
|
||||||
|
@ -333,7 +333,7 @@ impl Message {
|
||||||
/// message::Message,
|
/// message::Message,
|
||||||
/// nonce,
|
/// nonce,
|
||||||
/// pubkey::Pubkey,
|
/// pubkey::Pubkey,
|
||||||
/// signature::Keypair,
|
/// signature::{Keypair, Signer},
|
||||||
/// system_instruction,
|
/// system_instruction,
|
||||||
/// transaction::Transaction,
|
/// transaction::Transaction,
|
||||||
/// };
|
/// };
|
||||||
|
|
Loading…
Reference in New Issue