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

Rewrite BaseTrie and TrieNode #76

Closed
wants to merge 10 commits into from
13 changes: 7 additions & 6 deletions benchmarks/checkpointing.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var iterations = 500
var samples = 20
const async = require('async')
const crypto = require('crypto')
const Trie = require('../src/index.js')

var async = require('async')
var crypto = require('crypto')
var Trie = require('../index.js')
var i
const iterations = 500
const samples = 20

let i

function iterTest (numOfIter, cb) {
var vals = []
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/random.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/ethereum/wiki/wiki/Benchmarks
'use strict'
const Trie = require('../')
const Trie = require('../src')
const ethUtil = require('ethereumjs-util')
const async = require('async')

Expand All @@ -25,11 +25,11 @@ function run (cb) {
return i <= ROUNDS
},
function (done) {
seed = ethUtil.sha3(seed)
seed = ethUtil.keccak256(seed)
if (SYMMETRIC) {
trie.put(seed, seed, genRoot)
} else {
let val = ethUtil.sha3(seed)
let val = ethUtil.keccak256(seed)
trie.put(seed, val, genRoot)
}

Expand Down
Loading