-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zhangjunyu/inmemory merkletree #2
base: main
Are you sure you want to change the base?
Conversation
bb5cf93
to
65515e5
Compare
65515e5
to
331436b
Compare
src/merkle-tree-large.ts
Outdated
private db = new MerkleTreeDb(local_uri, this.db_name); | ||
private cache; | ||
private dbName = "delphinus"; | ||
private db; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
give type if you can, or add comment with reason
src/merkle-tree-large.ts
Outdated
private db; | ||
private inMemoryMerkleTree; | ||
|
||
constructor(memData = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for name of boolean var, start with is
, does
...
src/merkle-tree-large.ts
Outdated
@@ -42,14 +48,20 @@ export class MerkleTree { | |||
} | |||
|
|||
private async getRawNode(mtIndex: string) { | |||
return await this.db.queryMerkleTreeNodeFromPath(mtIndex + "I"); | |||
return await this.db!.queryMerkleTreeNodeFromPath(mtIndex + "I"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
never use !
, otherwise please add comment with reason
Signed-off-by: Zhang Junyu <[email protected]>
331436b
to
7783faa
Compare
No description provided.