Commit Graph

39 Commits

Author SHA1 Message Date
Stephen Akridge 22855def27 Fix race condition in store.
Multiple threads can enter the read lock and
all store the new empty set to account_maps.
Check again after taking write lock to make sure
only one thread actually inserts the new entry.
2019-03-07 14:58:52 -08:00
Stephen Akridge 61fbea3ee4 Cleanup AccountStorage apis
Remove duplicate code
2019-03-06 18:30:36 -08:00
Stephen Akridge b850f3c1dd Remove unnecessary cleanup_paths
drop handles it
2019-03-06 11:17:37 -07:00
Michael Vines 53f09c44f3 Rename tokens to lamports in sdk/ 2019-03-05 17:28:06 -08:00
Sagar Dhawan 9349f90a59
Inherit transaction count from parent (#3134) 2019-03-05 12:34:21 -08:00
Tyera Eulberg b4084c6298 Fix random comment typo 2019-03-05 09:33:27 -07:00
Stephen Akridge a3016aebaf Put accounts test data files in target directory
And gitignore it so those aren't added accidentally.
2019-03-04 10:17:02 -08:00
Rob Walker e4dba03e12
accounts shedding (#3078)
* accounts shedding

* fixup
2019-03-03 16:04:04 -08:00
Stephen Akridge e1a1296b9b Fix cleanup_paths
Add back remove of parent in Accounts::drop, but
remove that in the cleanup_paths helper
for the account tests which do not use
make_default_dir.
2019-03-02 20:24:57 -08:00
Greg Fitzgerald 1edf6c361e
Move Vote program out of the SDK 2019-03-02 16:44:36 -08:00
Sagar Dhawan d22a13257e
Refactor bank get vote accounts (#3052) 2019-03-02 16:44:36 -08:00
Rob Walker f4c5b9ccb0 remove remove_dir_all() of paths' parents (which we didn't make to begin with) 2019-03-02 12:36:41 -08:00
Michael Vines a94880574b block_hash => blockhash 2019-03-02 12:13:30 -07:00
Michael Vines 258cf21416 Purge remaining last_id (now called block_hash) 2019-03-02 12:13:30 -07:00
Stephen Akridge 16b71a6be0 Cleanup fork id generation
Accounts could end up with id collision depending on how
banks are created, this shouldn't happen.
2019-03-02 10:34:41 -08:00
Stephen Akridge 4ee857ab7d More vote account fixes
vote_index not being maintained correctly during a squash.
The tokens==0 shielding accounts were being inserted with
owner=default Pubkey so they didn't know they are vote accounts
and should update the vote accounts set.
2019-03-01 16:25:14 -08:00
Sagar Dhawan 20e4edec61
Refactor Vote Program Account setup (#2992) 2019-02-28 17:08:45 -08:00
Stephen Akridge 1c44b738fe Fix vote_accounts test 2019-02-28 15:22:47 -08:00
Sathish Ambley 0f2226901d Fix transaction count after squash 2019-02-27 23:21:49 -08:00
Rob Walker d23f8a3e99
increase accounts coverage (#2993) 2019-02-27 21:42:14 -08:00
Michael Vines 0dc5af62ff Standardize on 'use log::*' for easy access to all log level macros 2019-02-27 21:16:23 -08:00
Rob Walker 7fd40f1eb9
add failing test for #2994 (#2995) 2019-02-27 20:46:26 -08:00
Rob Walker 163874d4da
remove `purge` parameter to accounts (#2990) 2019-02-27 16:06:06 -08:00
Sathish Ambley ca0f16ccc0 Fix test failure 2019-02-27 08:22:52 -08:00
Stephen Akridge c241a56fb0 Remove extraneous print. 2019-02-27 08:22:52 -08:00
Sathish Ambley 4149f7fd1c Fix review comments 2019-02-27 08:22:52 -08:00
Sathish Ambley 96b349dcbb Performance optimizations 2019-02-27 08:22:52 -08:00
Stephen Akridge 5216952691 Change benchmark path to target/ or OUT_DIR
Also reduce some code duplication with cleanup_dirs fn.
2019-02-27 08:22:52 -08:00
Sathish Ambley c46b2541fe - Fix lock/unlock of accounts
- Fix format check warnings
2019-02-27 08:22:52 -08:00
Stephen Akridge 2158ba5863 tx count per fork 2019-02-27 08:22:52 -08:00
Stephen Akridge 180d297df8 Rebase and panic with no accounts
Add Accounts::has_accounts function for hash_internal_state calculation.
2019-02-27 08:22:52 -08:00
Sathish Ambley c276375a0e Persistent account storage across directories 2019-02-27 08:22:52 -08:00
Rob Walker 87281f6ed5
ensure at Accounts level that tokens == 0 means None (#2960) 2019-02-26 13:51:39 -08:00
Rob Walker 25690ff078
merge_parents() => squash() (#2943) 2019-02-25 20:34:05 -08:00
Michael Vines 897279eddb Encapsulate log::Level so counter macro users don't need to use it 2019-02-25 20:01:30 -08:00
Rob Walker f6ff33db8e
* add merge_parents(), which means 'eat your parent' (#2851)
* add is_root(), which is false if the bank has a parent
* use is_root() for store_slow and store_accounts to decide whether to purge on zero balance
2019-02-21 12:08:50 -08:00
Pankaj Garg a33921ed34 address review comments 2019-02-20 08:12:37 -07:00
Pankaj Garg a27cdf55e7 Credit transaction fees to the slot leader 2019-02-20 08:12:37 -07:00
Greg Fitzgerald dde886f058 Move Bank to its own crate
Also:
* counters.rs to solana_metrics
* genesis_block.rs to solana_sdk
2019-02-19 07:17:04 -07:00