Entry API for cuprate_database
#181
Labels
A-storage
Related to storage.
C-proposal
A proposal of some kind, and a request for comments.
E-help-wanted
Call for participation: Help is requested to fix this issue.
E-medium
Medium difficulty. Experience needed to fix: Intermediate.
What
This proposal describes a new
std::collections::btree_map::Entry
-like API to be added tocuprate_database
.3 public types will be added:
enum Entry
struct OccupiedEntry
struct VacantEntry
The API for these types will closely resemble
std
's API.Where
Added onto the
cuprate_database::DatabaseRw
trait:This replaces functions like
DatabaseRw::update
:cuprate/storage/cuprate-blockchain/src/database.rs
Line 195 in b76042a
and some awkward code:
cuprate/storage/cuprate-blockchain/src/ops/output.rs
Lines 32 to 41 in b76042a
Why
All the same reasons why
std::collections::btree_map::Entry
exists.The text was updated successfully, but these errors were encountered: