-
Notifications
You must be signed in to change notification settings - Fork 65
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
db: decouple db module #1885
db: decouple db module #1885
Conversation
battlmonstr
commented
Mar 6, 2024
- move access_layer Account test
- refactor EthStatusDataProvider, move it to sentry
- add silkworm_db library target
- cleanup silkworm_rpcdaemon cmake script, it doesn't depends on silkworm_node now 🎉
- cleanup some cmds to not depend on silkworm_node
* move access_layer Account test
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.
Great change!
I've got some minor comments, but you can ignore if you think they are not important
silkworm_db | ||
PUBLIC ${LIBS_PUBLIC} | ||
PRIVATE ${LIBS_PRIVATE} | ||
EXCLUDE_REGEX "db/etl" |
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.
EXCLUDE_REGEX "db/etl" | |
EXCLUDE_REGEX "etl" |
not sure about it, can you double check?
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.
EXCLUDE_REGEX is a temporary hack to exclude sub-libraries. The plan is to detect them automatically and exclude their subfolders from the sources list. It's on my TODO list ✍️
if (head_total_difficulty) { | ||
head_info.total_difficulty = head_total_difficulty.value(); | ||
} else { | ||
log::Warning("db::HeadInfo") << "total difficulty of canonical hash at height " << std::to_string(head_height) << " not found in db"; |
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.
We should log the warning only in cases when total difficulty is required
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.
I agree. This function should probably be refactored to not log, but return optional values in these fields. Then we can check them and log on the call site.