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
I think this is sort of working as intended, given that the backend is named PrefixDB - it is the user's responsibility to use non-overlapping prefixes if necessary, which is simple enough by appending a reserved separator to the prefix, e.g. 0x00.
We could add a separator parameter to the constructor (to maintain backwards compatibility), but it is kind of redundant - the following examples do exactly the same:
// With separator parameterNewPrefixDB(db, []byte("prefix"), []byte("/"))
// Without separator parameterNewPrefixDB(db, []byte("prefix/"))
It would also require the user to use the same separator consistently across PrefixDB instances, otherwise they would have the same problem.
Activity
melekes commentedon Sep 18, 2019
I think this is super important.
erikgrinaker commentedon May 18, 2020
I think this is sort of working as intended, given that the backend is named
PrefixDB- it is the user's responsibility to use non-overlapping prefixes if necessary, which is simple enough by appending a reserved separator to the prefix, e.g.0x00.We could add a
separatorparameter to the constructor (to maintain backwards compatibility), but it is kind of redundant - the following examples do exactly the same:It would also require the user to use the same separator consistently across PrefixDB instances, otherwise they would have the same problem.
chore: package `prefixdb` (#6)
build(deps): bump google.golang.org/grpc from 1.50.1 to 1.52.0 (tende…