BlockchainLMDB: do not assume alignment for alt block entries#10046
BlockchainLMDB: do not assume alignment for alt block entries#10046tobtoht merged 1 commit intomonero-project:masterfrom
Conversation
vtnerd
left a comment
There was a problem hiding this comment.
This should do as advertised, but not certain how this is going to be ported to 0.18 with this C++17 code.
|
Sorry, I'm not seeing how this helps anything. It looks like all you're doing is aligning the memory buffer that you're passing to LMDB. That buffer's alignment is irrelevant, since it has nothing to do with where in the mmap the value will actually get written. As I said in #10045, if you want to preserve alignment, you must pad the size of the block blob to the proper alignment, before writing it to LMDB. |
|
Ah okay, then I misunderstood your original answer, will rework now. |
25a2488 to
a5b2ad0
Compare
|
I implemented padding locally, but it was a lot more complicated than just not assuming alignment, so that's what I did in the latest commit. |
|
Msys compile error is not relevant to this PR, see #10036. |
Issue with alignment described in #10045. A full database migration shouldn't be required since alt blocks are flushed on startup.