Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow separate accounting store #2109

Closed
wants to merge 2 commits into from

Conversation

ralph-pichler
Copy link
Member

@ralph-pichler ralph-pichler commented Jun 16, 2021

related to #968

This change is Reviewable

@Eknir
Copy link
Contributor

Eknir commented Jun 17, 2021

Why would you want to do this?

@ralph-pichler
Copy link
Member Author

@Eknir so you can reset statestore / localstore without resettting private key / chequebooks.

@Eknir
Copy link
Contributor

Eknir commented Jun 17, 2021

that's useful 👍

@ldeffenb
Copy link
Collaborator

@Eknir so you can reset statestore / localstore without resettting private key / chequebooks.

But isn't the checkbook address stored in statestore?

Copy link
Contributor

@mrekucci mrekucci left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ralph-pichler)


pkg/node/statestore.go, line 40 at r1 (raw file):

		return ret, nil
	}
	return leveldb.NewStateStore(filepath.Join(dataDir, "accountingstore"), log)

Would be nice to check the dataDir validity before passing it, e.g.:

dir, err := os.Stat(dataDir)
if err != nil {
	return fmt.Errorf("failed to open directory, error: %w", err)
}
if !dir.IsDir() {
	return fmt.Errorf("%q is not a directory", dir.Name())
}

@github-actions
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

github-actions bot commented Nov 1, 2021

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

github-actions bot commented Nov 7, 2021

This PR was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants