Export TriedDb type

This commit is contained in:
Jaco Greeff
2018-09-01 23:31:20 +02:00
parent fbbcc2d92d
commit 1106579164
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
// of the ISC license. See the LICENSE file for details.
import { TxDb, ProgressCb } from '@polkadot/db/types';
import { Node, NodeBranch, NodeEncodedOrEmpty, NodeKv, NodeNotEmpty, NodeType } from './types';
import { TrieDb, Node, NodeBranch, NodeEncodedOrEmpty, NodeKv, NodeNotEmpty, NodeType } from './types';
import MemoryDb from '@polkadot/db/Memory';
import isNull from '@polkadot/util/is/null';
@@ -20,7 +20,7 @@ import { EMPTY_HASH, EMPTY_U8A } from './constants';
const l = logger('trie/db');
export default class Trie implements TxDb<Uint8Array> {
export default class Trie implements TrieDb {
private db: TxDb;
private txRoot: Uint8Array;
private rootHash: Uint8Array;
+5
View File
@@ -2,6 +2,8 @@
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
import { TxDb } from '@polkadot/db/types';
export enum NodeType {
EMPTY = 0,
LEAF = 1,
@@ -30,3 +32,6 @@ export type NodeKv = [EncodedPath, NodeEncodedOrEmpty];
export type NodeNotEmpty = NodeKv | NodeBranch;
export type Node = NodeEmpty | NodeNotEmpty;
export interface TrieDb extends TxDb<Uint8Array> {
}