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
Orphan blocks are leaked on flush #261
Comments
@tomasbrod @skcin I'm torn between the following fixes:
Thoughts? |
Would this introduce instability? |
@grctest I'd say no and that we want to move towards
Hypothetical refactoring of
makes it correct but now it's inconsistent with the other two. It's pretty much the same here :) I'm leaning towards making the small implementation now and doing a more broad switch to shared_ptr "in the future". |
This is still issue. |
Submitted a pull request with a quick fix. |
Fixed. |
The blocks which are not yet a part of the chain are considered orphan and stored in
mapOrphanBlocks
which is periodically flushed during sync. The problem is that it's storing naked pointers which aren't deleted on flush which should cause a memory leak (haven't checked in Valgrind yet).Change this to store a shared pointer until the block has been serialized to disk and detached from the orphan map.
The text was updated successfully, but these errors were encountered: