Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NethermindEth/juno
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eee78bb46c38d833f1eb75b220faf4a6d6114216
Choose a base ref
..
head repository: NethermindEth/juno
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 538f3e1756a1c681c229acefebe1ded2fe55628a
Choose a head ref
Showing with 6 additions and 6 deletions.
  1. +4 −4 core/trie2/trie.go
  2. +1 −1 core/trie2/triedb/{ → pathdb}/database.go
  3. +1 −1 core/trie2/triedb/{ → pathdb}/types.go
8 changes: 4 additions & 4 deletions core/trie2/trie.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ import (

"github.com/NethermindEth/juno/core/crypto"
"github.com/NethermindEth/juno/core/felt"
"github.com/NethermindEth/juno/core/trie2/triedb"
"github.com/NethermindEth/juno/core/trie2/triedb/pathdb"
"github.com/NethermindEth/juno/core/trie2/trienode"
"github.com/NethermindEth/juno/core/trie2/trieutils"
"github.com/NethermindEth/juno/db"
@@ -31,7 +31,7 @@ type Trie struct {
hashFn crypto.HashFn

// The underlying database to store and retrieve trie nodes
db triedb.TrieDB
db pathdb.TrieDB

// Check if the trie has been committed. Trie is unusable once committed.
committed bool
@@ -54,7 +54,7 @@ type TrieID interface {

// Creates a new trie
func New(id TrieID, height uint8, hashFn crypto.HashFn, txn db.Transaction) (*Trie, error) {
database := triedb.New(txn, id.Bucket())
database := pathdb.New(txn, id.Bucket())
tr := &Trie{
owner: id.Owner(),
height: height,
@@ -80,7 +80,7 @@ func NewEmpty(height uint8, hashFn crypto.HashFn) *Trie {
hashFn: hashFn,
root: nil,
nodeTracer: newTracer(),
db: triedb.EmptyDatabase{},
db: pathdb.EmptyDatabase{},
}
}

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package triedb
package pathdb

import (
"bytes"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package triedb
package pathdb

type leafType uint8