mirror of
https://github.com/tornadocash/fixed-merkle-tree.git
synced 2024-11-22 01:37:09 +01:00
fix imports
This commit is contained in:
parent
6173676074
commit
fba9bab7a8
@ -1,6 +1,5 @@
|
|||||||
import { defaultHash, Element, HashFunction, MerkleTreeOptions, ProofPath, SerializedTreeState, TreeEdge } from './'
|
import { defaultHash, Element, HashFunction, MerkleTreeOptions, ProofPath, SerializedTreeState, TreeEdge } from './'
|
||||||
|
|
||||||
|
|
||||||
export default class MerkleTree {
|
export default class MerkleTree {
|
||||||
levels: number
|
levels: number
|
||||||
private _hashFn: HashFunction<Element>
|
private _hashFn: HashFunction<Element>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { MerkleTree } from '../src'
|
import { MerkleTree, TreeEdge } from '../src'
|
||||||
import { assert, should } from 'chai'
|
import { assert, should } from 'chai'
|
||||||
import { it } from 'mocha'
|
import { it } from 'mocha'
|
||||||
import { TreeEdge } from '../lib'
|
|
||||||
|
|
||||||
describe('MerkleTree', () => {
|
describe('MerkleTree', () => {
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { Element, MerkleTree, PartialMerkleTree } from '../src'
|
import { Element, MerkleTree, PartialMerkleTree } from '../src'
|
||||||
import { it } from 'mocha'
|
import { it } from 'mocha'
|
||||||
import { should } from 'chai'
|
import { assert, should } from 'chai'
|
||||||
import * as assert from 'assert'
|
|
||||||
|
|
||||||
describe('PartialMerkleTree', () => {
|
describe('PartialMerkleTree', () => {
|
||||||
const getTestTrees = (levels: number, elements: Element[], edgeElement: Element) => {
|
const getTestTrees = (levels: number, elements: Element[], edgeElement: Element) => {
|
||||||
@ -74,7 +73,7 @@ describe('PartialMerkleTree', () => {
|
|||||||
}).timeout(10000)
|
}).timeout(10000)
|
||||||
|
|
||||||
it('should fail to insert too many elements', () => {
|
it('should fail to insert too many elements', () => {
|
||||||
const { fullTree, partialTree } = getTestTrees(2, [1, 2, 3, 4], 3)
|
const { partialTree } = getTestTrees(2, [1, 2, 3, 4], 3)
|
||||||
const call = () => partialTree.bulkInsert([5, 6, 7])
|
const call = () => partialTree.bulkInsert([5, 6, 7])
|
||||||
should().throw(call, 'Tree is full')
|
should().throw(call, 'Tree is full')
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user