Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

junyu0312
Copy link
Contributor

No description provided.

@junyu0312 junyu0312 force-pushed the zhangjunyu/inmemory-merklytree branch from bb5cf93 to 65515e5 Compare October 25, 2021 02:44
@junyu0312 junyu0312 changed the title Zhangjunyu/inmemory merklytree Zhangjunyu/inmemory merkletree Oct 25, 2021
@junyu0312 junyu0312 force-pushed the zhangjunyu/inmemory-merklytree branch from 65515e5 to 331436b Compare October 25, 2021 02:45
private db = new MerkleTreeDb(local_uri, this.db_name);
private cache;
private dbName = "delphinus";
private db;
Copy link
Contributor

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

private db;
private inMemoryMerkleTree;

constructor(memData = false) {
Copy link
Contributor

@lanbones lanbones Oct 27, 2021

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 ...

@@ -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");
Copy link
Contributor

@lanbones lanbones Oct 27, 2021

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

@junyu0312 junyu0312 force-pushed the zhangjunyu/inmemory-merklytree branch from 331436b to 7783faa Compare November 2, 2021 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants