We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 761bef0 commit 9c75bb8Copy full SHA for 9c75bb8
packages/trie/src/baseTrie.ts
@@ -58,21 +58,28 @@ export class Trie {
58
this.db = db ? new DB(db) : new DB()
59
this._root = this.EMPTY_TRIE_ROOT
60
if (root) {
61
- this._setRoot(root)
+ this.setRoot(root)
62
}
63
64
65
/** Sets the current root of the `trie` */
66
set root(value: Buffer) {
67
- this._setRoot(value)
+ this.setRoot(value)
68
69
70
/** Gets the current root of the `trie` */
71
get root(): Buffer {
72
return this._root
73
74
75
- _setRoot(value?: Buffer) {
+ /**
76
+ * This method is deprecated.
77
+ * Please use `Trie.root(value)` instead.
78
+ *
79
+ * @param value
80
+ * @deprecated
81
+ */
82
+ setRoot(value?: Buffer) {
83
if (!value) {
84
value = this.EMPTY_TRIE_ROOT
85
0 commit comments