Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit d5861b8

Browse files
authored
Merge pull request #104 from ethereumjs/fixReadme
Fix test cases and docs
2 parents d48a38c + b2c6fe9 commit d5861b8

20 files changed

+3013
-1043
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: node_js
22
node_js:
3-
- "6"
43
- "8"
54
- "9"
65
- "10"
6+
- "12"
77
env:
88
- CXX=g++-4.8
99
services:
@@ -32,4 +32,3 @@ matrix:
3232
node_js: "8"
3333
env: CXX=g++-4.8 TEST_SUITE=test:browser
3434
script: npm run build && npm run $TEST_SUITE
35-

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# SYNOPSIS
22

3-
[![NPM Package](https://img.shields.io/npm/v/merkle-patricia-tree.svg?style=flat-square)](https://www.npmjs.org/package/merkle-patricia-tree)
4-
[![Build Status](https://img.shields.io/travis/ethereumjs/merkle-patricia-tree.svg?branch=master&style=flat-square)](https://travis-ci.org/ethereumjs/merkle-patricia-tree)
5-
[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/merkle-patricia-tree.svg?style=flat-square)](https://coveralls.io/r/ethereumjs/merkle-patricia-tree)
6-
[![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs-lib.svg?style=flat-square)](https://gitter.im/ethereum/ethereumjs-lib) or #ethereumjs on freenode
3+
[![NPM Package](https://img.shields.io/npm/v/merkle-patricia-tree)](https://www.npmjs.org/package/merkle-patricia-tree)
4+
[![Build Status](https://img.shields.io/travis/ethereumjs/merkle-patricia-tree/master)](https://travis-ci.org/ethereumjs/merkle-patricia-tree)
5+
[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/merkle-patricia-tree.svg)](https://coveralls.io/r/ethereumjs/merkle-patricia-tree)
6+
[![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs-lib.svg)](https://gitter.im/ethereum/ethereumjs-lib)
77

88
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
99

@@ -30,8 +30,8 @@ const Trie = require('merkle-patricia-tree').BaseTrie,
3030
db = level('./testdb'),
3131
trie = new Trie(db)
3232

33-
trie.put('test', 'one', function() {
34-
trie.get('test', function(err, value) {
33+
trie.put(Buffer.from('test'), Buffer.from('one'), function() {
34+
trie.get(Buffer.from('test'), function(err, value) {
3535
if (value) console.log(value.toString())
3636
})
3737
})
@@ -40,9 +40,9 @@ trie.put('test', 'one', function() {
4040
## Merkle Proofs
4141

4242
```javascript
43-
Trie.prove(trie, 'test', function(err, prove) {
43+
Trie.prove(trie, Buffer.from('test'), function(err, prove) {
4444
if (err) return cb(err)
45-
Trie.verifyProof(trie.root, 'test', prove, function(err, value) {
45+
Trie.verifyProof(trie.root, Buffer.from('test'), prove, function(err, value) {
4646
if (err) return cb(err)
4747
console.log(value.toString())
4848
cb()
@@ -117,7 +117,7 @@ trie.get(address, function(err, data) {
117117

118118
# API
119119

120-
[./docs/](./docs/index.md)
120+
[Documentation](./docs/README.md)
121121

122122
# TESTING
123123

docs/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[merkle-patricia-tree](README.md)
2+
3+
# merkle-patricia-tree
4+
5+
## Index
6+
7+
### Modules
8+
9+
* ["baseTrie"](modules/_basetrie_.md)
10+
* ["checkpointTrie"](modules/_checkpointtrie_.md)
11+
* ["secure"](modules/_secure_.md)

0 commit comments

Comments
 (0)