Delete lots of fee parameters
So many zeros!
This commit is contained in:
@ -18,13 +18,13 @@ impl SystemTransaction {
|
||||
lamports: u64,
|
||||
space: u64,
|
||||
program_id: &Pubkey,
|
||||
fee: u64,
|
||||
_fee: u64,
|
||||
) -> Transaction {
|
||||
let from_pubkey = from_keypair.pubkey();
|
||||
let create_instruction =
|
||||
SystemInstruction::new_program_account(&from_pubkey, to, lamports, space, program_id);
|
||||
let instructions = vec![create_instruction];
|
||||
Transaction::new_signed_instructions(&[from_keypair], instructions, recent_blockhash, fee)
|
||||
Transaction::new_signed_instructions(&[from_keypair], instructions, recent_blockhash)
|
||||
}
|
||||
|
||||
/// Create and sign a transaction to create a system account
|
||||
@ -52,12 +52,12 @@ impl SystemTransaction {
|
||||
from_keypair: &Keypair,
|
||||
recent_blockhash: Hash,
|
||||
program_id: &Pubkey,
|
||||
fee: u64,
|
||||
_fee: u64,
|
||||
) -> Transaction {
|
||||
let from_pubkey = from_keypair.pubkey();
|
||||
let assign_instruction = SystemInstruction::new_assign(&from_pubkey, program_id);
|
||||
let instructions = vec![assign_instruction];
|
||||
Transaction::new_signed_instructions(&[from_keypair], instructions, recent_blockhash, fee)
|
||||
Transaction::new_signed_instructions(&[from_keypair], instructions, recent_blockhash)
|
||||
}
|
||||
|
||||
/// Create and sign new SystemInstruction::Move transaction
|
||||
@ -66,11 +66,11 @@ impl SystemTransaction {
|
||||
to: &Pubkey,
|
||||
lamports: u64,
|
||||
recent_blockhash: Hash,
|
||||
fee: u64,
|
||||
_fee: u64,
|
||||
) -> Transaction {
|
||||
let from_pubkey = from_keypair.pubkey();
|
||||
let move_instruction = SystemInstruction::new_move(&from_pubkey, to, lamports);
|
||||
let instructions = vec![move_instruction];
|
||||
Transaction::new_signed_instructions(&[from_keypair], instructions, recent_blockhash, fee)
|
||||
Transaction::new_signed_instructions(&[from_keypair], instructions, recent_blockhash)
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,6 @@ impl Transaction {
|
||||
from_keypairs: &[&T],
|
||||
instructions: Vec<Instruction>,
|
||||
recent_blockhash: Hash,
|
||||
_fee: u64,
|
||||
) -> Transaction {
|
||||
let message = Message::new(instructions);
|
||||
Self::new(from_keypairs, message, recent_blockhash)
|
||||
@ -93,17 +92,15 @@ impl Transaction {
|
||||
|
||||
/// Create a signed transaction
|
||||
/// * `from_keypairs` - The keys used to sign the transaction.
|
||||
/// * `account_keys` - The keys for the transaction. These are the program state
|
||||
/// * `keys` - The keys for the transaction. These are the program state
|
||||
/// instances or lamport recipient keys.
|
||||
/// * `recent_blockhash` - The PoH hash.
|
||||
/// * `fee` - The transaction fee.
|
||||
/// * `program_ids` - The keys that identify programs used in the `instruction` vector.
|
||||
/// * `instructions` - Instructions that will be executed atomically.
|
||||
pub fn new_with_compiled_instructions<T: KeypairUtil>(
|
||||
from_keypairs: &[&T],
|
||||
keys: &[Pubkey],
|
||||
recent_blockhash: Hash,
|
||||
_fee: u64,
|
||||
program_ids: Vec<Pubkey>,
|
||||
instructions: Vec<CompiledInstruction>,
|
||||
) -> Self {
|
||||
@ -225,7 +222,6 @@ mod tests {
|
||||
&[&key],
|
||||
&[key1, key2],
|
||||
Hash::default(),
|
||||
0,
|
||||
vec![prog1, prog2],
|
||||
instructions,
|
||||
);
|
||||
@ -260,7 +256,6 @@ mod tests {
|
||||
&[&key],
|
||||
&[],
|
||||
Hash::default(),
|
||||
0,
|
||||
vec![],
|
||||
instructions,
|
||||
);
|
||||
@ -274,7 +269,6 @@ mod tests {
|
||||
&[&key],
|
||||
&[],
|
||||
Hash::default(),
|
||||
0,
|
||||
vec![Pubkey::default()],
|
||||
instructions,
|
||||
);
|
||||
|
Reference in New Issue
Block a user