update kvdb & co (#12312)

* upgrade kvdb & co

* remove patch

* update Cargo.lock

* upgrade impl-serde

* fix parsing test

* actually fix it

* FFS
This commit is contained in:
Andronik
2022-10-05 23:07:15 +02:00
committed by GitHub
parent 93e8ffed55
commit 9e423925f6
24 changed files with 73 additions and 103 deletions
+4 -9
View File
@@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use kvdb::{DBTransaction, KeyValueDB};
use kvdb::{DBKeyValue, DBTransaction, KeyValueDB};
use kvdb_rocksdb::{Database, DatabaseConfig};
use std::{io, path::PathBuf, sync::Arc};
@@ -38,7 +38,7 @@ impl KeyValueDB for ParityDbWrapper {
}
/// Get a value by partial key. Only works for flushed data.
fn get_by_prefix(&self, _col: u32, _prefix: &[u8]) -> Option<Box<[u8]>> {
fn get_by_prefix(&self, _col: u32, _prefix: &[u8]) -> io::Result<Option<Vec<u8>>> {
unimplemented!()
}
@@ -56,7 +56,7 @@ impl KeyValueDB for ParityDbWrapper {
}
/// Iterate over flushed data for a given column.
fn iter<'a>(&'a self, _col: u32) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a> {
fn iter<'a>(&'a self, _col: u32) -> Box<dyn Iterator<Item = io::Result<DBKeyValue>> + 'a> {
unimplemented!()
}
@@ -65,12 +65,7 @@ impl KeyValueDB for ParityDbWrapper {
&'a self,
_col: u32,
_prefix: &'a [u8],
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a> {
unimplemented!()
}
/// Attempt to replace this database with a new one located at the given path.
fn restore(&self, _new_db: &str) -> io::Result<()> {
) -> Box<dyn Iterator<Item = io::Result<DBKeyValue>> + 'a> {
unimplemented!()
}
}