Jeff Washington (jwash)
a7070a5ca7
set_lamports() ( #16921 )
2021-04-28 21:30:06 +00:00
Jeff Washington (jwash)
21c75d9d29
lamports = -> set_lamports ( #16919 )
2021-04-28 15:39:54 -05:00
Jeff Washington (jwash)
f533d3be77
Write account path impl ReadableAccount ( #16779 )
2021-04-28 15:29:22 -05:00
Jeff Washington (jwash)
9070191b8b
stats on clean for removing roots ( #16849 )
...
* stats on clean for removing roots
* rename
* accumulate and swap metrics
2021-04-28 13:24:01 -05:00
Brooks Prumo
77f1ffd84b
Collect uncleaned pubkeys from all slots ( #16786 )
...
While working on another issue (#16580 ), the list of uncleaned pubkeys
returned from `remove_uncleaned_slots_and_collect_pubkeys_up_to_slot()`
did not include unrooted slots. This meant that during cleaning,
unrooted slots would not have their pubkeys cleaned up properly.
Now, return all uncleaned pubkeys, regardless if the slot is rooted or
not. Additionally, update the tests to have unrooted slots to ensure
this behavior.
This is part two of PR #16879 , and originally based on PR #15106 .
2021-04-28 10:57:42 -05:00
Jeff Washington (jwash)
a7a671b3aa
AccountSharedData.set_executable() ( #16881 )
2021-04-28 14:07:43 +00:00
Jeff Washington (jwash)
2021255f91
executable() ( #16880 )
2021-04-28 08:53:54 -05:00
Jeff Washington (jwash)
da3342759b
private AccountSharedData.rent_epoch ( #16877 )
2021-04-28 08:52:20 -05:00
Jeff Washington (jwash)
6381ee38eb
reclaims unref accounts from index ( #16838 )
2021-04-28 08:50:38 -05:00
Jeff Washington (jwash)
1864bc2080
write Option<AccountSharedData> ( #16874 )
...
* write Option<&AccountSharedData>
* add comment
2021-04-28 08:47:26 -05:00
Brooks Prumo
1eaff394da
Refactor `collect_uncleaned_pubkeys_to_slot()` ( #16879 )
...
* Refactor `collect_uncleaned_pubkeys_to_slot()`
While working on another issue (#16580 ), I came across
`collect_unclean_pubkeys_to_slot()` and had difficulty understanding it.
Since the function does a few logically separate things, I split the
function up. I also added documentation, removed an unused return value,
and renamed the functions to be more specific.
This commit is to split up an existing PR (#16786 ), where I had both this
aesthetic change _and_ a behavioral change.
2021-04-28 08:16:12 -05:00
Jeff Washington (jwash)
1bd623cd15
private AccountSharedData.rent_epoch ( #16844 )
2021-04-27 13:51:13 -05:00
Jeff Washington (jwash)
8f56c116d7
tests: lamports += to checked_add ( #16842 )
2021-04-27 10:23:07 -05:00
Jeff Washington (jwash)
d533f77301
bank.withdraw uses checked_sub_lamports ( #16848 )
...
* bank.withdraw uses checked_sub_lamports
* retain previous codepath for error
* map_err from clippy
2021-04-27 09:58:41 -05:00
Jeff Washington (jwash)
3887169db0
lamports += to checked_add ( #16841 )
2021-04-27 09:56:18 -05:00
Jeff Washington (jwash)
47ca7063f2
rootstracker.remove returns previous state ( #16831 )
2021-04-27 09:15:44 -05:00
Jeff Washington (jwash)
3fdbaefaa6
tests: lamports -= to checked_sub ( #16843 )
2021-04-27 09:12:48 -05:00
Jeff Washington (jwash)
998cba74b5
AccountSharedData.executable() ( #16835 )
2021-04-27 09:12:17 -05:00
Jeff Washington (jwash)
81402ee7f5
pass &Pubkey through account storage, slot clean code to reduce copies ( #16778 )
...
* &Pubkey
* use trait to pass &Hash or Hash
* use impl Borrow<Hash> instead of trait
* remove old code line commented out
2021-04-27 09:10:06 -05:00
Jeff Washington (jwash)
603872685d
private AccountSharedData.owner ( #16760 )
...
* private AccountSharedData.owner
* fix perf test
2021-04-26 14:59:17 -05:00
Jeff Washington (jwash)
f2ab0384e4
owner -> owner() ( #16783 )
2021-04-26 17:06:40 +00:00
Jeff Washington (jwash)
aeff911c93
owner -> owner() ( #16784 )
2021-04-26 10:40:11 -05:00
Michael Vines
d9dcd28d82
Ignore racy test_load_account_and_purge_race_without_retry
2021-04-23 23:17:56 +00:00
Jeff Washington (jwash)
ca14c18998
owner -> owner() ( #16782 )
2021-04-23 22:49:47 +00:00
Jeff Washington (jwash)
1a4a7059af
owner -> owner() ( #16785 )
2021-04-23 15:59:13 -05:00
Jeff Washington (jwash)
48c07d32f0
WritableAccount.add/subtract_lamports ( #16750 )
...
* add/sub lamports
* make add/sub return Result
* sample replacements
* cleanup
* fix up a few tests as examples
* move enum, cleanup, impl from
* fmt
* cleanup
* add lamports.rs
2021-04-23 20:20:48 +00:00
Trent Nelson
be29568318
runtime: checked math for Bank::withdraw
2021-04-23 20:13:35 +00:00
Jeff Washington (jwash)
dcf2d84b24
refactor complicated 'len' ( #16777 )
2021-04-23 18:36:49 +00:00
Jeff Washington (jwash)
04e6aebf35
.owner = X -> .set_owner(X) ( #16759 )
2021-04-23 18:26:33 +00:00
Jeff Washington (jwash)
fb0b76c1f3
account.owner = X -> account.set_owner(X) ( #16754 )
2021-04-23 12:34:22 -05:00
Jeff Washington (jwash)
7602911f9a
read_only_cache remove updates cache size ( #16742 )
2021-04-23 12:00:17 -05:00
Jeff Washington (jwash)
1cc9a1c0eb
log roots range metric ( #16636 )
...
* log roots range metric
* rename
2021-04-23 16:09:39 +00:00
Jeff Washington (jwash)
96d21335e1
.owner -> .owner() ( #16758 )
2021-04-23 09:35:55 -05:00
Jeff Washington (jwash)
5591cd6ef3
.owner -> .owner() ( #16757 )
...
* .owner -> .get_owner()
* use
2021-04-23 09:35:09 -05:00
Jeff Washington (jwash)
6c5b7ecf90
account.owner = X -> account.set_owner(X) ( #16756 )
2021-04-23 09:34:28 -05:00
Jeff Washington (jwash)
91be2903da
Reduce account index lookups during clean ( #16689 )
...
* reduce account index lookups in clean
* rename
* rename enum
* hold locks during removal from zero pubkey list
* merge with zero lamport fix
* tests
2021-04-23 09:33:14 -05:00
Jeff Washington (jwash)
fc12841d95
Readonlyaccounts ( #16743 )
...
* lamports -> lamports()
* format
2021-04-22 20:04:55 +00:00
Jeff Washington (jwash)
739f0698ab
clean read_only_cache in the bg ( #16722 )
...
* clean read_only_cache in the bg
* reset lru_index
* cleanup
* cleanup
* drop for read only cache
* join bg thread
* reuse existing lru vec
* simplify reserve logic
2021-04-22 13:59:58 -05:00
Jeff Washington (jwash)
333998d008
.lamports = <number> -> .set_lamports(<number>) ( #16746 )
2021-04-22 18:56:47 +00:00
Jeff Washington (jwash)
8a6b80095e
Set lamports ( #16747 )
...
* lamports = -> set_lamports()
* .lamports = X -> .set_lamports(X)
2021-04-22 13:53:06 -05:00
Jeff Washington (jwash)
8d9d6b62d9
use cheaper account get ( #16682 )
2021-04-22 12:54:08 -05:00
Jeff Washington (jwash)
123e0bdba7
don't iterate slot_list if zero-lamport ( #16678 )
2021-04-21 20:38:48 -05:00
Jeff Washington (jwash)
69cbad0869
some ReadableAccount changes ( #16688 )
...
* some ReadableAccount changes
* deref
2021-04-21 12:20:37 -05:00
Jeff Washington (jwash)
189d2121e6
simplify do_shrink_slot_stores, delay/reduce account clone ( #16691 )
2021-04-21 11:17:38 -05:00
Jeff Washington (jwash)
9852572eb9
increase rolling slot width to 4M ( #16583 )
2021-04-20 21:18:15 -05:00
Jeff Washington (jwash)
03f7b251b8
ReadableAccount.data returns slice ( #16686 )
...
* ReadAbleAccount.data returns slice
* more slice fixup
* more slice
* slice
2021-04-20 16:41:16 -05:00
Jeff Washington (jwash)
36e11998c7
read only accounts cache uses accurate size representation ( #16610 )
...
* read ony accounts cache uses accurate size representation
* add comment and test
2021-04-20 09:58:01 -05:00
Jack May
01786f684e
Remove unwrap ( #16652 )
2021-04-19 20:17:56 -07:00
Jeff Washington (jwash)
4aa753ff01
rename threads: 15 char limit ( #16625 )
2021-04-19 12:16:58 -05:00
Alexander Meißner
9dfcb921cf
Refactoring: Move KeyedAccounts to InvokeContext ( #15410 )
...
Collects all parametric occurrences and the construction of keyed_accounts and puts them into InvokeContext.
2021-04-19 18:48:48 +02:00