18 Commits

Author SHA1 Message Date
Tyera Eulberg
9f53f3455a Revert "Revert "Reformat imports to a consistent style for imports""
This reverts commit d7377d4794.
2021-12-16 19:28:48 -07:00
Trent Nelson
d7377d4794 Revert "Reformat imports to a consistent style for imports"
This reverts commit 139d15cd84.
2021-12-13 12:46:23 -06:00
Michael Vines
139d15cd84 Reformat imports to a consistent style for imports
rustfmt.toml configuration:
        imports_granularity = "One"
         group_imports = "One"
2021-12-03 09:41:09 -08:00
mergify[bot]
0e7512a225 Fix Nightly Clippy Warnings (backport #18065) (#18070)
* chore: cargo +nightly clippy --fix -Z unstable-options

(cherry picked from commit 6514096a67)

# Conflicts:
#	core/src/banking_stage.rs
#	core/src/cost_model.rs
#	core/src/cost_tracker.rs
#	core/src/execute_cost_table.rs
#	core/src/replay_stage.rs
#	core/src/tvu.rs
#	ledger-tool/src/main.rs
#	programs/bpf_loader/build.rs
#	rbpf-cli/src/main.rs
#	sdk/cargo-build-bpf/src/main.rs
#	sdk/cargo-test-bpf/src/main.rs
#	sdk/src/secp256k1_instruction.rs

* chore: cargo fmt

(cherry picked from commit 789f33e8db)

* Updates BPF program assert_instruction_count tests.

(cherry picked from commit c1e03f3410)

# Conflicts:
#	programs/bpf/tests/programs.rs

* Resolve conflicts

Co-authored-by: Alexander Meißner <AlexanderMeissner@gmx.net>
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-06-18 20:02:48 +00:00
Jeff Washington (jwash)
98f1b11edd Ancestors to HashSet: From(Vec) (#17447)
* ancestors.large_range_slots becomes HashSet

* Ancestors to HashSet: From(Vec)
2021-05-25 11:01:11 -05:00
Jeff Washington (jwash)
0486df02ba don't limit to thread pool when cleaning on startup (#17317) 2021-05-20 14:36:35 -05:00
Jeff Washington (jwash)
a9aa533684 replace Ancestors HashMap for performance (#16477)
* replace Ancestors HashMap for performance

* add ancestors module
2021-05-20 10:11:56 -05:00
Jeff Washington (jwash)
ed9cbd50f0 move Ancestors to its own module (#17316) 2021-05-19 11:50:34 -05:00
Jeff Washington (jwash)
541aa5ad85 tests: lamports -> lamports() (#16982) 2021-05-03 10:45:54 -05:00
Jeff Washington (jwash)
763c04adf3 lamports = -> .set_lamports() (#16980) 2021-04-30 21:17:05 +00:00
Jeff Washington (jwash)
3fdbaefaa6 tests: lamports -= to checked_sub (#16843) 2021-04-27 09:12:48 -05:00
Jeff Washington (jwash)
69cbad0869 some ReadableAccount changes (#16688)
* some ReadableAccount changes

* deref
2021-04-21 12:20:37 -05:00
carllin
d747614b27 Account for possibility of cache flush in load() (#15454)
* Account for possibility of cache flush in load()

* More cleaning

* More cleaning

* Remove unused method and some comment cleaning

* Fix typo

* Make the detected impossible purge race panic()!

* Finally revert to original .expect()

* Fix typos...

* Add assertion for max_root for easier reasoning

* Reframe races with LoadHint as possible opt.

* Fix test

* Make race bug tests run longer for less flaky

* Delay the clone-in-lock slow path even for RPC

* Make get_account panic-free & add its onchain ver.

* Fix rebase conflicts...

* Clean up

* Clean up comment

* Revert fn name change

* Fix flaky test...

* fmt...

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2021-04-17 00:23:32 +09:00
Brooks Prumo
17aa45fad1 Remove old way of account hashing
Account data hashing used to use different ways of hashing on different
clusters.  That is no longer the case, but the old code still existed.
This commit removes that old, now used code.

**NOTE** The golden hash values in bank.rs needed to be updated.  Since
the original code that selected the hash algorithm used `if >` instead
of `if >=`, this meant that the genesis block's hash _always_ used the
old hashing method, which is no longer valid.

Validated by running `cargo test` successfully.
2021-04-13 14:42:21 -05:00
Jeff Washington (jwash)
8a3135d17b Account->AccountSharedData (#15691) 2021-03-09 15:06:07 -06:00
Michael Vines
5df36aec7d Pacify clippy 2021-02-19 20:08:41 -08:00
carllin
6dfad0652f Cache account stores, flush from AccountsBackgroundService (#13140) 2021-01-11 17:00:23 -08:00
sakridge
1c61d005b5 Re-enable shrink test (#14331) 2020-12-30 08:25:45 -08:00