Skip to content

Commit 675999a

Browse files
Junha Yangmajecty
authored andcommitted
Update dependencies
Also we now specify tags, to use specific commits in github dependencies
1 parent 08bd8ce commit 675999a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ license = "AGPL-3.0"
77
edition = "2018"
88

99
[dependencies]
10-
codechain-crypto = { git = "https://github.com/CodeChain-io/rust-codechain-crypto.git", version = "0.2" }
10+
codechain-crypto = { git = "https://github.com/CodeChain-io/rust-codechain-crypto.git", version = "0.3", tag = "v0.3.0" }
1111
kvdb = "0.1"
1212
plain_hasher = "0.2"
13-
primitives = { git = "https://github.com/CodeChain-io/rust-codechain-primitives.git", version = "0.4" }
14-
rlp = { git = "https://github.com/CodeChain-io/rlp.git", version = "0.4" }
13+
primitives = { git = "https://github.com/CodeChain-io/rust-codechain-primitives.git", version = "0.5.0", tag = "v0.5.1" }
14+
rlp = { git = "https://github.com/CodeChain-io/rlp.git", version = "0.5", tag = "v0.5.0" }
1515

1616
[dev-dependencies]
1717
kvdb-memorydb = "0.1"

src/journaldb/archivedb.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl ArchiveDB {
5959

6060
fn payload(&self, key: &H256) -> Option<DBValue> {
6161
self.backing
62-
.get(self.column, &**key)
62+
.get(self.column, key.as_bytes())
6363
.expect("Low-level database error. Some issue with your hard disk?")
6464
.map(|data| data.to_vec())
6565
}
@@ -125,7 +125,7 @@ impl JournalDB for ArchiveDB {
125125
for i in self.overlay.drain() {
126126
let (key, (value, rc)) = i;
127127
if rc > 0 {
128-
batch.put(self.column, &key, &value);
128+
batch.put(self.column, key.as_bytes(), &value);
129129
inserts += 1;
130130
}
131131
if rc < 0 {
@@ -158,18 +158,18 @@ impl JournalDB for ArchiveDB {
158158
for i in self.overlay.drain() {
159159
let (key, (value, rc)) = i;
160160
if rc > 0 {
161-
if self.backing.get(self.column, &key)?.is_some() {
161+
if self.backing.get(self.column, key.as_bytes())?.is_some() {
162162
return Err(DatabaseError::AlreadyExists(key))
163163
}
164-
batch.put(self.column, &key, &value);
164+
batch.put(self.column, key.as_bytes(), &value);
165165
inserts += 1;
166166
}
167167
if rc < 0 {
168168
assert_eq!(-1, rc);
169-
if self.backing.get(self.column, &key)?.is_none() {
169+
if self.backing.get(self.column, key.as_bytes())?.is_none() {
170170
return Err(DatabaseError::NegativelyReferencedHash(key))
171171
}
172-
batch.delete(self.column, &key);
172+
batch.delete(self.column, key.as_bytes());
173173
deletes += 1;
174174
}
175175
}

0 commit comments

Comments
 (0)