Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

New state tests #5418

Merged
merged 2 commits into from Apr 12, 2017
Merged

New state tests #5418

merged 2 commits into from Apr 12, 2017

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Apr 6, 2017

No description provided.

@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Apr 6, 2017
pub fn get_temp_state_db_in(path: &Path) -> StateDB {
let db = new_db(path.to_str().expect("Only valid utf8 paths for tests."));
let journal_db = journaldb::new(db.clone(), journaldb::Algorithm::EarlyMerge, ::db::COL_STATE);
StateDB::new(journal_db, 5 * 1024 * 1024)
}

pub fn get_temp_mem_state_db() -> StateDB {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just replace the other functions with this implementation? State and StateDB They don't have access to the underlying database anyway, only the KeyValueDB trait interface.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires a lot of changes that are out of scope of this PR. I'll see if I can do that in another one.

@gavofyork
Copy link
Contributor

what a mess state.rs is now - can't we ditch the huge list in favour of some more automated system?

@arkpar arkpar added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 9, 2017
@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Apr 10, 2017
@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 12, 2017
@gavofyork gavofyork merged commit 15ae24b into master Apr 12, 2017
@gavofyork gavofyork deleted the state-tests branch April 12, 2017 11:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants