Merge pull request #2016 from ethcore/archivedb-assert

Disable ArchiveDB counter check
This commit is contained in:
Robert Habermeier 2016-09-01 11:50:48 +02:00 committed by GitHub
commit ca03cfa58a

View File

@ -163,7 +163,6 @@ impl JournalDB for ArchiveDB {
for i in self.overlay.drain().into_iter() { for i in self.overlay.drain().into_iter() {
let (key, (value, rc)) = i; let (key, (value, rc)) = i;
if rc > 0 { if rc > 0 {
assert!(rc == 1);
batch.put(self.column, &key, &value); batch.put(self.column, &key, &value);
inserts += 1; inserts += 1;
} }
@ -192,7 +191,6 @@ impl JournalDB for ArchiveDB {
for i in self.overlay.drain().into_iter() { for i in self.overlay.drain().into_iter() {
let (key, (value, rc)) = i; let (key, (value, rc)) = i;
if rc > 0 { if rc > 0 {
assert!(rc == 1);
if try!(self.backing.get(self.column, &key)).is_some() { if try!(self.backing.get(self.column, &key)).is_some() {
return Err(BaseDataError::AlreadyExists(key).into()); return Err(BaseDataError::AlreadyExists(key).into());
} }