-
Notifications
You must be signed in to change notification settings - Fork 771
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
trie: convert constructor to options interface, remove deprecated setRoot #1874
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
LGTM
@@ -735,7 +750,7 @@ export class Trie { | |||
*/ | |||
copy(): Trie { | |||
const db = this.db.copy() | |||
return new Trie(db._leveldb, this.root) | |||
return new Trie({ db: db._leveldb, root: this.root, deleteFromDB: this._deleteFromDB }) |
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.
Ah, that's all a lot nicer, great to see this. 👍 🙂
…Root (#1874) * trie: add constructor options interface * remove assert use, remove deprecated setRoot
…Root (#1874) * trie: add constructor options interface * remove assert use, remove deprecated setRoot
…Root (#1874) * trie: add constructor options interface * remove assert use, remove deprecated setRoot
…Root (#1874) * trie: add constructor options interface * remove assert use, remove deprecated setRoot
…Root (#1874) * trie: add constructor options interface * remove assert use, remove deprecated setRoot
…Root (#1874) * trie: add constructor options interface * remove assert use, remove deprecated setRoot
Completes tasks in #1717:
Trie.setRoot()
functionextra:
assert
usage, preferring normal errors