Backport of core's PR9999
Details
Details
- Reviewers
schancel - Group Reviewers
Restricted Project - Commits
- rSTAGING1a14d235e200: [LevelDB] Plug leveldb logs to bitcoin logs
rABC1a14d235e200: [LevelDB] Plug leveldb logs to bitcoin logs
make check
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/dbwrapper.cpp | ||
---|---|---|
60 ↗ | (On Diff #2344) | When p = limit - 1 from above: We check if *(limit - 2) != '\n', then we set *(limit - 1) = '\n' then add one to p leaving p == limit. Below we have std::min(bufsize - 1, (int)(p - base)) => std::min(bufsize - 1, bufsize) == bufsize - 1 => base[bufsize-1] == limit - 1 Then we're effectively doing *(limit -1) = '\0' and eating the newline we just added? Is that all that can happen, or did I make a mistake? |
src/dbwrapper.cpp | ||
---|---|---|
60 ↗ | (On Diff #2344) | Yes, but it's not a guarantee that p = limit - 1 so I don't see the problem here. There are numerous other stupid stuff in the code, such as it allocate a buffer and free it at every loop iteration. |
src/dbwrapper.cpp | ||
---|---|---|
60 ↗ | (On Diff #2344) | Just ensuring there aren't any edge cases that could screw things up. This seems like logging will just look weird. |