Remove fee-payer guesswork from Message and Transaction (#10776)

* Make Message::new_with_payer the default constructor

* Remove Transaction::new_[un]signed_instructions

These guess the fee-payer instead of stating it explicitly
This commit is contained in:
Greg Fitzgerald
2020-06-24 14:52:38 -06:00
committed by GitHub
parent d5d5ad0071
commit 1c498369b5
47 changed files with 516 additions and 497 deletions

View File

@@ -1711,7 +1711,7 @@ pub mod tests {
&leader_vote_keypair.pubkey(),
vote,
);
let vote_msg = Message::new_with_payer(&[vote_ix], Some(&leader_vote_keypair.pubkey()));
let vote_msg = Message::new(&[vote_ix], Some(&leader_vote_keypair.pubkey()));
let vote_tx = Transaction::new(&[&leader_vote_keypair], vote_msg, Hash::default());
let shreds = entries_to_test_shreds(
vec![next_entry_mut(&mut Hash::default(), 0, vec![vote_tx])],
@@ -3425,7 +3425,7 @@ pub mod tests {
bank.get_minimum_balance_for_rent_exemption(VoteState::size_of()),
);
let message = Message::new_with_payer(&instructions, Some(&alice.pubkey()));
let message = Message::new(&instructions, Some(&alice.pubkey()));
let transaction = Transaction::new(
&[&alice, &alice_vote_keypair],
message,