lnd.xprv/channeldb/kvdb/etcd
Andras Banki-Horvath 63e9d6102f
kvdb+etcd: change flattened bucket key derivation algorithm
This commit changes the key derivation algo we use to emulate buckets
similar to bbolt. The issue with prefixing keys with either a bucket or
a value prefix is that the cursor couldn't effectively iterate trough
all keys in a bucket, as it skipped the bucket keys.
While there are multiple ways to fix that issue (eg. two pointers,
iterating value keys then bucket keys, etc), the cleanest is to instead
of prefixes in keys we use a postfix indicating whether a key is a
bucket or a value. This also simplifies all operations where we
(recursively) iterate a bucket and is equivalent with the prefixing key
derivation with the addition that bucket and value keys are now
continous.
2020-07-28 17:57:29 +02:00
..
bucket_test.go etcd: add namespace support to separate key spaces 2020-05-22 11:26:25 +02:00
bucket.go kvdb+etcd: change flattened bucket key derivation algorithm 2020-07-28 17:57:29 +02:00
db_test.go kvdb: make etcd tests use testify require instead of assert 2020-07-28 17:57:24 +02:00
db.go kvdb+etcd: integrate the abort context to the STM retry loop 2020-06-03 17:44:44 +02:00
driver_test.go kvdb: make etcd tests use testify require instead of assert 2020-07-28 17:57:24 +02:00
driver.go kvdb+lncfg: fully move etcd behind build tag 2020-05-22 11:26:25 +02:00
embed.go kvdb+etcd: integrate the abort context to the STM retry loop 2020-06-03 17:44:44 +02:00
fixture_test.go kvdb+lncfg: fully move etcd behind build tag 2020-05-22 11:26:25 +02:00
readwrite_bucket_test.go kvdb+etcd: change flattened bucket key derivation algorithm 2020-07-28 17:57:29 +02:00
readwrite_bucket.go kvdb+etcd: change flattened bucket key derivation algorithm 2020-07-28 17:57:29 +02:00
readwrite_cursor_test.go kvdb+etcd: change flattened bucket key derivation algorithm 2020-07-28 17:57:29 +02:00
readwrite_cursor.go kvdb+etcd: change flattened bucket key derivation algorithm 2020-07-28 17:57:29 +02:00
readwrite_tx_test.go kvdb: make etcd tests use testify require instead of assert 2020-07-28 17:57:24 +02:00
readwrite_tx.go etcd: add namespace support to separate key spaces 2020-05-22 11:26:25 +02:00
stm_test.go kvdb: make etcd tests use testify require instead of assert 2020-07-28 17:57:24 +02:00
stm.go lnd: fix go fmt 2020-07-08 16:46:51 +08:00
walletdb_interface_test.go kvdb+lncfg: fully move etcd behind build tag 2020-05-22 11:26:25 +02:00