Rename tokens to lamports in programs/
This commit is contained in:
@ -229,9 +229,9 @@ pub fn clear_credits(keyed_accounts: &mut [KeyedAccount]) -> Result<(), ProgramE
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn create_vote_account(tokens: u64) -> Account {
|
||||
pub fn create_vote_account(lamports: u64) -> Account {
|
||||
let space = VoteState::max_size();
|
||||
Account::new(tokens, space, id())
|
||||
Account::new(lamports, space, id())
|
||||
}
|
||||
|
||||
pub fn initialize_and_deserialize(
|
||||
|
@ -26,12 +26,12 @@ impl VoteTransaction {
|
||||
.sign(&[voting_keypair], recent_blockhash)
|
||||
}
|
||||
|
||||
/// Fund or create the staking account with tokens
|
||||
/// Fund or create the staking account with lamports
|
||||
pub fn new_account(
|
||||
from_keypair: &Keypair,
|
||||
voter_id: Pubkey,
|
||||
recent_blockhash: Hash,
|
||||
num_tokens: u64,
|
||||
lamports: u64,
|
||||
fee: u64,
|
||||
) -> Transaction {
|
||||
let from_id = from_keypair.pubkey();
|
||||
@ -40,7 +40,7 @@ impl VoteTransaction {
|
||||
.push(SystemInstruction::new_program_account(
|
||||
from_id,
|
||||
voter_id,
|
||||
num_tokens,
|
||||
lamports,
|
||||
space,
|
||||
id(),
|
||||
))
|
||||
@ -48,13 +48,13 @@ impl VoteTransaction {
|
||||
.sign(&[from_keypair], recent_blockhash)
|
||||
}
|
||||
|
||||
/// Fund or create the staking account with tokens
|
||||
/// Fund or create the staking account with lamports
|
||||
pub fn new_account_with_delegate(
|
||||
from_keypair: &Keypair,
|
||||
voter_keypair: &Keypair,
|
||||
delegate_id: Pubkey,
|
||||
recent_blockhash: Hash,
|
||||
num_tokens: u64,
|
||||
lamports: u64,
|
||||
fee: u64,
|
||||
) -> Transaction {
|
||||
let from_id = from_keypair.pubkey();
|
||||
@ -64,7 +64,7 @@ impl VoteTransaction {
|
||||
.push(SystemInstruction::new_program_account(
|
||||
from_id,
|
||||
voter_id,
|
||||
num_tokens,
|
||||
lamports,
|
||||
space,
|
||||
id(),
|
||||
))
|
||||
|
Reference in New Issue
Block a user