Fix test: Prevent SystemInstruction CreateAccount from overwriting accounts in use

This commit is contained in:
Tyera Eulberg
2019-03-05 00:17:59 -07:00
committed by Tyera Eulberg
parent 202adb1bf1
commit f506b0a224
2 changed files with 16 additions and 10 deletions

View File

@@ -59,9 +59,9 @@ fn test_create_cannot_overwrite_used_account() {
);
// create_account on an initialized account should fail
system_bank
assert!(system_bank
.create_account(&from_keypair, other_account, 100)
.unwrap();
.is_err());
assert_eq!(system_bank.bank.get_balance(&other_account), 1);
assert_eq!(
system_bank.bank.get_account(&other_account).unwrap().owner,