solana/program-test
Alessandro Decina b9f4c8e3c0
BorrowedAccount: add set_data_from_slice(), make set_data() take owned values (#27836)
* BorrowedAccount: add set_data_from_slice(), make set_data() take owned values

set_data() used to take a slice and would force alloc+copy if the caller
has owned values (eg account creation, account lookup table).

Expose set_data_from_slice() for callers that have slices, and switch
set_data() to taking an owned Vec.

* BorrowAccount: refactor common accounts_update_delta code in helper method

* BorrowedAccount: add extend_from_slice()

This allows avoiding copies appending entries to account lookup tables.

* BorrowedAccount: remove unnecessary ifs around update_accounts_resize_delta
2022-09-24 01:37:02 +01:00
..
src BorrowedAccount: add set_data_from_slice(), make set_data() take owned values (#27836) 2022-09-24 01:37:02 +01:00
tests Use BPF serialization ABI for native target in program-test; Fix account data resizing and editing (#26507) 2022-07-18 18:13:03 +02:00
Cargo.toml Whickey/version v1.15 (#27739) 2022-09-13 09:06:15 -05:00