mirror of
https://github.com/XTXMarkets/ternfs.git
synced 2026-04-30 14:49:20 -05:00
Read/write spans
This commit is contained in:
@@ -25,4 +25,17 @@ std::ostream& operator<<(std::ostream& out, const EdgeKey& edgeKey) {
|
||||
}
|
||||
out << ")";
|
||||
return out;
|
||||
}
|
||||
|
||||
void blockServicesToValue(const BincodeList<EntryBlockService>& entries, std::string& buf) {
|
||||
buf.resize(entries.packedSize());
|
||||
BincodeBuf bbuf(buf);
|
||||
bbuf.packList(entries);
|
||||
ALWAYS_ASSERT(bbuf.remaining() == 0);
|
||||
}
|
||||
|
||||
void blockServicesFromValue(const rocksdb::Slice& value, BincodeList<EntryBlockService>& entries) {
|
||||
BincodeBuf bbuf((char*)value.data(), value.size());
|
||||
bbuf.unpackList(entries);
|
||||
ALWAYS_ASSERT(bbuf.remaining() == 0);
|
||||
}
|
||||
Reference in New Issue
Block a user