Skip to content

Commit fa788f1

Browse files
author
wanderer
committed
fixed ipld-graph-builder
1 parent 4fe6af7 commit fa788f1

File tree

4 files changed

+21
-32
lines changed

4 files changed

+21
-32
lines changed

datastore.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ const cbor = require('borc')
66

77
module.exports = class TreeDAG extends DAG {
88
async put (val) {
9-
if (TreeDAG.isValidLink(val)) {
10-
return val
11-
}
129
const encoded = cbor.encode(val)
1310
const key = await TreeDAG.getMerkleLink(encoded)
1411

package-lock.json

Lines changed: 18 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"dependencies": {
3030
"borc": "^2.0.2",
31-
"ipld-graph-builder": "^1.3.7",
31+
"ipld-graph-builder": "^1.3.8",
3232
"text-encoding": "^0.6.4",
3333
"uint1array": "^1.0.5"
3434
},

tests/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ const level = require('level-browserify')
44
const RadixTree = require('../')
55
const db = level('./testdb')
66

7-
tape('set and get', async t => {
7+
tape('should generate the same stateRoot', async t => {
88
let tree = new RadixTree({
99
db: db
1010
})
1111
const stateRoot = await tree.flush()
12-
console.log(stateRoot)
1312
const stateRoot2 = await tree.flush()
14-
console.log(stateRoot2)
13+
t.deepEquals(stateRoot2, stateRoot)
1514
t.end()
1615
})
1716

0 commit comments

Comments
 (0)