Delete lots of fee parameters
So many zeros!
This commit is contained in:
@ -381,7 +381,7 @@ pub fn make_tiny_test_entries_from_hash(start: &Hash, num: usize) -> Vec<Entry>
|
||||
(0..num)
|
||||
.map(|_| {
|
||||
let ix = BudgetInstruction::new_apply_timestamp(&pubkey, &pubkey, &pubkey, Utc::now());
|
||||
let tx = Transaction::new_signed_instructions(&[&keypair], vec![ix], *start, 0);
|
||||
let tx = Transaction::new_signed_instructions(&[&keypair], vec![ix], *start);
|
||||
Entry::new_mut(&mut hash, &mut num_hashes, vec![tx])
|
||||
})
|
||||
.collect()
|
||||
@ -400,7 +400,7 @@ pub fn make_large_test_entries(num_entries: usize) -> Vec<Entry> {
|
||||
let pubkey = keypair.pubkey();
|
||||
|
||||
let ix = BudgetInstruction::new_apply_timestamp(&pubkey, &pubkey, &pubkey, Utc::now());
|
||||
let tx = Transaction::new_signed_instructions(&[&keypair], vec![ix], one, 0);
|
||||
let tx = Transaction::new_signed_instructions(&[&keypair], vec![ix], one);
|
||||
|
||||
let serialized_size = serialized_size(&tx).unwrap();
|
||||
let num_txs = BLOB_DATA_SIZE / serialized_size as usize;
|
||||
@ -457,25 +457,25 @@ mod tests {
|
||||
fn create_sample_payment(keypair: &Keypair, hash: Hash) -> Transaction {
|
||||
let pubkey = keypair.pubkey();
|
||||
let ixs = BudgetInstruction::new_payment(&pubkey, &pubkey, 1);
|
||||
Transaction::new_signed_instructions(&[keypair], ixs, hash, 0)
|
||||
Transaction::new_signed_instructions(&[keypair], ixs, hash)
|
||||
}
|
||||
|
||||
fn create_sample_timestamp(keypair: &Keypair, hash: Hash) -> Transaction {
|
||||
let pubkey = keypair.pubkey();
|
||||
let ix = BudgetInstruction::new_apply_timestamp(&pubkey, &pubkey, &pubkey, Utc::now());
|
||||
Transaction::new_signed_instructions(&[keypair], vec![ix], hash, 0)
|
||||
Transaction::new_signed_instructions(&[keypair], vec![ix], hash)
|
||||
}
|
||||
|
||||
fn create_sample_signature(keypair: &Keypair, hash: Hash) -> Transaction {
|
||||
let pubkey = keypair.pubkey();
|
||||
let ix = BudgetInstruction::new_apply_signature(&pubkey, &pubkey, &pubkey);
|
||||
Transaction::new_signed_instructions(&[keypair], vec![ix], hash, 0)
|
||||
Transaction::new_signed_instructions(&[keypair], vec![ix], hash)
|
||||
}
|
||||
|
||||
fn create_sample_vote(keypair: &Keypair, hash: Hash) -> Transaction {
|
||||
let pubkey = keypair.pubkey();
|
||||
let ix = VoteInstruction::new_vote(&pubkey, Vote::new(1));
|
||||
Transaction::new_signed_instructions(&[keypair], vec![ix], hash, 0)
|
||||
Transaction::new_signed_instructions(&[keypair], vec![ix], hash)
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -340,14 +340,13 @@ pub fn make_active_set_entries(
|
||||
&[active_keypair.as_ref()],
|
||||
new_vote_account_ixs,
|
||||
*blockhash,
|
||||
1,
|
||||
);
|
||||
let new_vote_account_entry = next_entry_mut(&mut last_entry_hash, 1, vec![new_vote_account_tx]);
|
||||
|
||||
// 3) Create vote entry
|
||||
let vote_ix = VoteInstruction::new_vote(&voting_keypair.pubkey(), Vote::new(slot_to_vote_on));
|
||||
let vote_tx =
|
||||
Transaction::new_signed_instructions(&[&voting_keypair], vec![vote_ix], *blockhash, 0);
|
||||
Transaction::new_signed_instructions(&[&voting_keypair], vec![vote_ix], *blockhash);
|
||||
let vote_entry = next_entry_mut(&mut last_entry_hash, 1, vec![vote_tx]);
|
||||
|
||||
// 4) Create `num_ending_ticks` empty ticks
|
||||
|
@ -329,7 +329,6 @@ impl LocalCluster {
|
||||
&[from_account.as_ref()],
|
||||
instructions,
|
||||
client.get_recent_blockhash().unwrap(),
|
||||
1,
|
||||
);
|
||||
|
||||
client
|
||||
@ -347,7 +346,6 @@ impl LocalCluster {
|
||||
&[vote_account],
|
||||
vec![vote_instruction],
|
||||
client.get_recent_blockhash().unwrap(),
|
||||
1,
|
||||
);
|
||||
|
||||
client
|
||||
|
@ -320,7 +320,6 @@ impl ReplayStage {
|
||||
&[voting_keypair.as_ref()],
|
||||
vec![vote_ix],
|
||||
bank.last_blockhash(),
|
||||
0,
|
||||
);
|
||||
if let Some(new_root) = locktower.record_vote(bank.slot()) {
|
||||
bank_forks.write().unwrap().set_root(new_root);
|
||||
@ -657,7 +656,6 @@ mod test {
|
||||
&[voting_keypair.as_ref()],
|
||||
vec![vote_ix],
|
||||
bank.last_blockhash(),
|
||||
0,
|
||||
);
|
||||
cluster_info_me.write().unwrap().push_vote(vote_tx);
|
||||
|
||||
|
@ -365,7 +365,7 @@ mod tests {
|
||||
None,
|
||||
51,
|
||||
);
|
||||
let tx = Transaction::new_signed_instructions(&[&contract_funds], ixs, blockhash, 0);
|
||||
let tx = Transaction::new_signed_instructions(&[&contract_funds], ixs, blockhash);
|
||||
let arc_bank = process_transaction_and_notify(&arc_bank, &tx, &rpc.subscriptions).unwrap();
|
||||
sleep(Duration::from_millis(200));
|
||||
|
||||
@ -398,7 +398,7 @@ mod tests {
|
||||
&contract_state.pubkey(),
|
||||
&bob_pubkey,
|
||||
);
|
||||
let tx = Transaction::new_signed_instructions(&[&witness], vec![ix], blockhash, 0);
|
||||
let tx = Transaction::new_signed_instructions(&[&witness], vec![ix], blockhash);
|
||||
let arc_bank = process_transaction_and_notify(&arc_bank, &tx, &rpc.subscriptions).unwrap();
|
||||
sleep(Duration::from_millis(200));
|
||||
|
||||
|
@ -18,7 +18,6 @@ pub fn test_multisig_tx() -> Transaction {
|
||||
let keypair1 = Keypair::new();
|
||||
let keypairs = vec![&keypair0, &keypair1];
|
||||
let lamports = 5;
|
||||
let fee = 2;
|
||||
let blockhash = Hash::default();
|
||||
|
||||
let system_instruction = SystemInstruction::Move { lamports };
|
||||
@ -31,7 +30,6 @@ pub fn test_multisig_tx() -> Transaction {
|
||||
&keypairs,
|
||||
&[],
|
||||
blockhash,
|
||||
fee,
|
||||
program_ids,
|
||||
instructions,
|
||||
)
|
||||
|
@ -114,7 +114,7 @@ pub mod tests {
|
||||
|
||||
fn process_instructions<T: KeypairUtil>(bank: &Bank, keypairs: &[&T], ixs: Vec<Instruction>) {
|
||||
let blockhash = bank.last_blockhash();
|
||||
let tx = Transaction::new_signed_instructions(keypairs, ixs, blockhash, 0);
|
||||
let tx = Transaction::new_signed_instructions(keypairs, ixs, blockhash);
|
||||
bank.process_transaction(&tx).unwrap();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user