-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Json dump for Dao state refactoring #5608
Conversation
- Write chainHeight - Write on new blocks or on parse complete from last persisted block height - Do not delete json dirs at start - Write txs and txos from block/s to write Not supporting cleanups in case of reorgs yet
In case of a reorg we pass the block height of the last persisted snapshot and delete all blocks and related tx/txos from that block height on. In case we dont have a snapshot we delete the whole json dir.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@softsimon Are you aware about this open change? |
} | ||
} catch (FileNotFoundException e) { | ||
e.printStackTrace(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't line 96 be log.error(e.toString());
if not a thrown exception? Stack traces printed to std.err can be out of sync with the logger's buffer flushing -- it can make the timing of the stack trace in the bisq.log file a bit confusing.
|
||
Futures.addCallback(future, Utilities.failureCallback(throwable -> { | ||
log.error(throwable.toString()); | ||
throwable.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this t.printStackTrace() redundant? You just logged the error, with stack trace.
I verified json dumps are happening while offers are being created in the api test harness. Stepped through json dump dirs created: OK Json file contents look OK to me. |
Close as totally outdated... |
In case of a reorg we pass the block height of the last persisted snapshot
and delete all blocks and related tx/txos from that block height on.
In case we dont have a snapshot we delete the whole json dir.
It is not tested much yet.
Will require adoption for the explorer nodes by @softsimon - should be either deployed to a branch or waited for merge to master until @softsimon signals readiness.