Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree: allow batching new leaf nodes #363

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version: 1.20.5
- name: Build
run: go build -v ./...

Expand All @@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.20.5
- name: Download golangci-lint
run: wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s latest
- name: Lint
Expand All @@ -41,6 +41,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.20.5
- name: Download precomp file
run: wget https://github.com/gballet/go-verkle/releases/download/banderwagonv3/precomp && ls -al
- name: Test
run: go test -v -race ./...
173 changes: 0 additions & 173 deletions conversion.go

This file was deleted.

10 changes: 2 additions & 8 deletions encoding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ func TestLeafStemLength(t *testing.T) {
// Serialize a leaf with no values, but whose stem is 32 bytes. The
// serialization should trim the extra byte.
toolong := make([]byte, 32)
leaf, err := NewLeafNode(toolong, make([][]byte, NodeWidth))
if err != nil {
t.Fatal(err)
}
leaf := NewLeafNode(toolong, make([][]byte, NodeWidth))
ser, err := leaf.Serialize()
if err != nil {
t.Fatal(err)
Expand All @@ -35,10 +32,7 @@ func TestInvalidNodeEncoding(t *testing.T) {
// Test an invalid node type.
values := make([][]byte, NodeWidth)
values[42] = testValue
ln, err := NewLeafNode(ffx32KeyTest, values)
if err != nil {
t.Fatal(err)
}
ln := NewLeafNode(ffx32KeyTest, values)
lnbytes, err := ln.Serialize()
if err != nil {
t.Fatalf("serializing leaf node: %v", err)
Expand Down
Loading