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 {
|
fn construct_instructions_account(message: &Message) -> Account {
|
||||||
let mut account = Account {
|
let mut data = message.serialize_instructions();
|
||||||
data: message.serialize_instructions(),
|
|
||||||
..Account::default()
|
|
||||||
};
|
|
||||||
|
|
||||||
// add room for current instruction index.
|
// add room for current instruction index.
|
||||||
account.data.resize(account.data.len() + 2, 0);
|
data.resize(data.len() + 2, 0);
|
||||||
account
|
Account {
|
||||||
|
data,
|
||||||
|
..Account::default()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_transaction(
|
fn load_transaction(
|
||||||
|
|
Loading…
Reference in New Issue