refactor function to store into account after data is finished (#15710)
This commit is contained in:
parent
9448540ea6
commit
13b9bb6790
|
@ -163,14 +163,13 @@ impl Accounts {
|
|||
}
|
||||
|
||||
fn construct_instructions_account(message: &Message) -> Account {
|
||||
let mut account = Account {
|
||||
data: message.serialize_instructions(),
|
||||
..Account::default()
|
||||
};
|
||||
|
||||
let mut data = message.serialize_instructions();
|
||||
// add room for current instruction index.
|
||||
account.data.resize(account.data.len() + 2, 0);
|
||||
account
|
||||
data.resize(data.len() + 2, 0);
|
||||
Account {
|
||||
data,
|
||||
..Account::default()
|
||||
}
|
||||
}
|
||||
|
||||
fn load_transaction(
|
||||
|
|
Loading…
Reference in New Issue