Storage chains: serve transactions over IPFS/bitswap (#7963)

* IPFS server for transactions

* Style

* Indent

* Log message

* CLI option

* Apply suggestions from code review

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Style

* Style

* Minor fixes

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
Arkadiy Paronyan
2021-02-03 08:14:23 +01:00
committed by GitHub
parent 3628998d3c
commit e905c9a92d
19 changed files with 574 additions and 22 deletions
+5
View File
@@ -115,6 +115,11 @@ pub trait Database<H: Clone>: Send + Sync {
/// `key` is not currently in the database.
fn get(&self, col: ColumnId, key: &[u8]) -> Option<Vec<u8>>;
/// Check if the value exists in the database without retrieving it.
fn contains(&self, col: ColumnId, key: &[u8]) -> bool {
self.get(col, key).is_some()
}
/// Call `f` with the value previously stored against `key`.
///
/// This may be faster than `get` since it doesn't allocate.