Commit Graph

6 Commits

Author SHA1 Message Date
Richard Patel 2f5954278c blockstore: simplify BlockWalkI.Entries()
Shredding is already implied by SlotMeta,
thus no need to return shreds and entries in the iterator.
2022-10-29 13:50:25 +02:00
Richard Patel 9a647f9aee cargen: use blockstore abstraction
Uses the blockstore.BlockWalkI abstraction introduced in 4644c3f
to decouple cargen from RocksDB.
2022-10-28 20:21:32 +00:00
Richard Patel 4644c3fa8e blockstore: split RocksDB-specific code into _rocks.go files
Splitting pure Go and Cgo code into separate Go files
allows other packages to depend on blockstore mocks.

This is useful for writing test scenarios for external
components that consume data from blockstore.
2022-10-28 18:31:15 +00:00
Leo 0d5dd26722 radiance: optional build tag for rocksdb commands
Compiling the rocksdb binding isn't as straight-forward
as installing rocksdb headers:

$ go build ./...
# github.com/linxGnu/grocksdb
../../go/pkg/mod/github.com/linx!gnu/grocksdb@v1.7.7/cache.go:84:2: could not determine kind of name for C.rocksdb_lru_cache_options_set_num_shard_bits

Adding an optional build tag to compile radiance with rocksdb
support, otherwise remove the blockstore command. This keeps
everything else working with CGO_ENABLED=0.
2022-09-26 13:29:59 +02:00
Richard Patel bb94b7e6c0
blockstore: let BlockWalk iterate over rooted slots only 2022-09-25 15:43:57 +02:00
Richard Patel 5fb1dfa576
car: refactor into cargen 2022-09-25 15:35:03 +02:00