We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb66ad1 commit 61d480dCopy full SHA for 61d480d
trie/ctrie/ctrie.go
@@ -322,7 +322,7 @@ func (c *Ctrie) Snapshot() *Ctrie {
322
root := c.readRoot()
323
main := gcasRead(root, c)
324
if c.rdcssRoot(root, main, root.copyToGen(&generation{}, c)) {
325
- return newCtrie(root.copyToGen(&generation{}, c), c.hashFactory, c.readOnly)
+ return newCtrie(c.readRoot().copyToGen(&generation{}, c), c.hashFactory, c.readOnly)
326
}
327
328
@@ -337,7 +337,7 @@ func (c *Ctrie) ReadOnlySnapshot() *Ctrie {
337
338
339
340
- return newCtrie(root, c.hashFactory, true)
+ return newCtrie(c.readRoot(), c.hashFactory, true)
341
342
343
0 commit comments