Skip to content
New issue

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

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

Already on GitHub? # to your account

object_database created outside of witness data directory when witness_node is started with --replay #436

Closed
abitmore opened this issue Oct 20, 2017 · 3 comments

Comments

@abitmore
Copy link
Member

Steps to reproduce with test-2.0.171008 tag:

  • run ./witness_node
  • a while after started and getting blocks, press Ctrl+C
  • run ./witness_node --replay, then an object_database directory will be created under current directory
@pmconrad pmconrad self-assigned this Oct 21, 2017
@pmconrad
Copy link
Contributor

With --replay-blockchain, database::wipe is called before opening the database.
database::wipe calls database::close before wiping, database::close calls object_database::flush, which writes the current contents (i. e. nothing) to a default-initialized (i. e. empty) fc::path.

@abitmore abitmore added this to the Future Non-Consensus-Changing Release milestone Nov 27, 2017
@abitmore abitmore added the bug label Dec 21, 2017
@windycrypto
Copy link
Member

windycrypto commented Feb 23, 2018

It seems _data_dir only be passed to object_database via open method, while wipe method not pass this variable.

So in object_database::flush() the object_database dir was created at current directory

@abitmore abitmore modified the milestones: Future Non-Consensus-Changing Release, Next Non-Consensus-Changing Release Feb 25, 2018
abitmore added a commit that referenced this issue Feb 28, 2018

Unverified

The committer email address is not verified.
Fix #436 object_database created outside of witness data directory
@abitmore
Copy link
Member Author

This has been done.

xeroc pushed a commit that referenced this issue Mar 20, 2018

Unverified

The committer email address is not verified.
xeroc pushed a commit that referenced this issue Mar 21, 2018

Unverified

The committer email address is not verified.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants