Fix pay-to-self Accounts bug (#2682)

* Add failing tests

* Fix tests

* Plumb AccountLoadedTwice error

* Fixup budget cancel actions to not depend on duplicate accounts

* Use has_duplicates

* Update budget-based golden
This commit is contained in:
Tyera Eulberg
2019-02-07 12:14:10 -07:00
committed by GitHub
parent 6317bec7aa
commit 3c6af52a71
6 changed files with 84 additions and 8 deletions

View File

@ -85,9 +85,13 @@ impl BudgetTransaction {
last_id: Hash,
) -> Transaction {
let instruction = Instruction::ApplySignature;
let mut keys = vec![contract];
if from_keypair.pubkey() != to {
keys.push(to);
}
Transaction::new(
from_keypair,
&[contract, to],
&keys,
budget_program::id(),
&instruction,
last_id,