You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#22263: refactor: wrap CCoinsViewCursor in unique_ptr
7ad414f doc: add comment about CCoinsViewDBCursor constructor (James O'Beirne)
0f8a5a4 move-only(ish): don't expose CCoinsViewDBCursor (James O'Beirne)
615c1ad refactor: wrap CCoinsViewCursor in unique_ptr (James O'Beirne)
Pull request description:
I tripped over this one for a few hours at the beginning of the week, so I've sort of got a personal vendetta against `CCoinsView::Cursor()` returning a raw pointer.
Specifically in the case of CCoinsViewDB, if a raw cursor is allocated and not freed, a cryptic leveldb assertion failure occurs on CCoinsViewDB destruction (`Assertion 'dummy_versions_.next_ == &dummy_versions_' failed.`).
This is a pretty simple change.
Related to: bitcoin#21766
See also: google/leveldb#142 (comment)
ACKs for top commit:
MarcoFalke:
review ACK 7ad414f 🔎
jonatack:
re-ACK 7ad414f modulo suggestion
ryanofsky:
Code review ACK 7ad414f. Two new commits look good and thanks for clarifying constructor comment
Tree-SHA512: 6471d03e2de674d84b1ea0d31e25f433d52aa1aa4996f7b4aab1bd02b6bc340b15e64cc8ea07bbefefa3b5da35384ca5400cc230434e787c30931b8574c672f9
0 commit comments