Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

merkle-patricia-tree

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merkle-patricia-tree - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

2

index.js

@@ -431,3 +431,3 @@ var assert = require('assert'),

assert(key.length === 0, 'key length should be 0 after we are done processing the stack');
//assert(key.length === 0, 'key length should be 0 after we are done processing the stack');

@@ -434,0 +434,0 @@ if (lastRoot) {

{
"name": "merkle-patricia-tree",
"version": "0.1.9",
"version": "0.1.10",
"description": "This is an implementation of the modified merkle patricia tree as speficed in the Ethereum's yellow paper.",

@@ -37,3 +37,4 @@ "main": "index.js",

"devDependencies": {
"mocha": "~1.18.2"
"mocha": "~1.18.2",
"ethrereum-tests": "git+https://github.com/ethereum/tests.git#develop"
},

@@ -40,0 +41,0 @@ "browser": {

@@ -6,3 +6,3 @@ var Trie = require('../index.js'),

assert = require('assert'),
jsonTests = require('./jsonTests/trietest.json');
jsonTests = require('ethereum-tests').trietest;

@@ -383,3 +383,3 @@ describe('simple save and retrive', function () {

before(function () {
testNames = Object.keys(jsonTests),
testNames = Object.keys(jsonTests);
trie = new Trie();

@@ -391,6 +391,13 @@ });

console.log(i);
var inputs = jsonTests[i].inputs;
var expect = jsonTests[i].expectation;
var inputs = jsonTests[i].in;
var expect = jsonTests[i].root;
async.eachSeries(inputs, function (input, done) {
for(i = 0; i < 2; i++){
if(input[i].slice(0,2) === '0x'){
input[i] = new Buffer(input[i].slice(2), 'hex');
}
}
trie.put(input[0], input[1], function () {

@@ -401,3 +408,3 @@ done();

assert.equal(trie.root.toString('hex'), expect);
assert.equal('0x' + trie.root.toString('hex'), expect);
trie = new Trie();

@@ -404,0 +411,0 @@ done();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc