Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Token 22: Add functionality to update extra_account_metas after initi…
…alizing. (#5894) * Added update function for ExtraAccountMetaList * Updated interface to handle new update instruction * Updated Cli to handle update command * updated example program to handle updating * Rust fmt trailing whitespace fix * Removed unused variable * Added more explicit update instruction doc comment * Allow for resizing to smaller account size * Removed system program from update instruction * Added helper fn to calculate transfer lamports * Added unit tests for update function * Added unit test for update instruction * removed unnecessary commented out code * re-added checks on initialization * turned of zero_init for realloc for performance * Fixed update doc comments * Used block-scoping rather than explicit drop() * Removed unnecessary convert to vec * refactored updated test into single test * added additional off-chain test of update instruct * made on-chain invoke update test to match original * moved helper function up to others * refactored create and update with helpers * rustfmt: fix * rustfmt: fix * removed commented out system program in update * renamed helpers and removed unnecessary helper * moved test helper up * fixed test attribute location * removed multiple init extra account metas in test * added instruction assert to update test * renamed transfer address to extra account metas * rustfmt: comment fix * clippy: fix * added update test with simple PDA * made more changes to updated metas in test * added check for if extra metas have be initialized * spelling fix * fixed initialized condition
- Loading branch information