require to account signature (#6658)

* require to signature

* fixing invocation to create_account

* fix create_account references

* address review comment

* whacking bugs in tests

* fixing stake program tests
This commit is contained in:
Parth
2019-11-08 15:57:35 +05:30
committed by GitHub
parent f7b6e777bf
commit 5bd05fba09
29 changed files with 277 additions and 153 deletions

View File

@@ -371,10 +371,11 @@ fn test_config_updates_requiring_config() {
fn test_config_initialize_no_panic() {
let (bank, alice_keypair) = create_bank(3);
let bank_client = BankClient::new(bank);
let config_account = Keypair::new();
let mut instructions = config_instruction::create_account::<MyConfig>(
&alice_keypair.pubkey(),
&Pubkey::new_rand(),
&config_account.pubkey(),
1,
vec![],
);
@@ -383,7 +384,7 @@ fn test_config_initialize_no_panic() {
let message = Message::new(instructions);
assert_eq!(
bank_client
.send_message(&[&alice_keypair], message)
.send_message(&[&alice_keypair, &config_account], message)
.unwrap_err()
.unwrap(),
TransactionError::InstructionError(1, InstructionError::NotEnoughAccountKeys)