Skip to content

Commit 4375725

Browse files
committed
Use readonly tree in bstm
1 parent fe831d5 commit 4375725

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

blockstm/btree.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ type BTree[T any] struct {
1414
// NewBTree returns a new BTree.
1515
func NewBTree[T any](less func(a, b T) bool, degree int) *BTree[T] {
1616
tree := btree.NewBTreeGOptions(less, btree.Options{
17-
NoLocks: true,
18-
Degree: degree,
17+
NoLocks: true,
18+
ReadOnly: true,
19+
Degree: degree,
1920
})
2021
t := &BTree[T]{}
2122
t.Store(tree)

0 commit comments

Comments
 (0)