-
Notifications
You must be signed in to change notification settings - Fork 39
/
manager_ompt.go
42 lines (32 loc) · 1.21 KB
/
manager_ompt.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package trie_manager
import (
"reflect"
"github.com/icon-project/goloop/common/db"
"github.com/icon-project/goloop/common/trie"
"github.com/icon-project/goloop/common/trie/cache"
"github.com/icon-project/goloop/common/trie/ompt"
)
func NewImmutableForObject(db db.Database, h []byte, t reflect.Type) trie.ImmutableForObject {
return ompt.NewImmutableForObject(db, h, t)
}
func NewMutableForObject(db db.Database, h []byte, t reflect.Type) trie.MutableForObject {
return ompt.NewMutableForObject(db, h, t)
}
func NewMutableFromImmutableForObject(object trie.ImmutableForObject) trie.MutableForObject {
return ompt.NewMutableFromImmutableForObject(object)
}
func NewImmutable(db db.Database, h []byte) trie.Immutable {
return ompt.NewImmutable(db, h)
}
func NewMutable(database db.Database, h []byte) trie.Mutable {
return ompt.NewMutable(database, h)
}
func NewMutableFromImmutable(object trie.Immutable) trie.Mutable {
return ompt.NewMutableFromImmutable(object)
}
func SetCacheOfMutable(mutable trie.Mutable, cache *cache.NodeCache) {
ompt.SetCacheOfMutable(mutable, cache)
}
func SetCacheOfMutableForObject(mutable trie.MutableForObject, cache *cache.NodeCache) {
ompt.SetCacheOfMutableForObject(mutable, cache)
}