Skip to content

Commit

Permalink
chain: reproduce panic
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Dec 10, 2024
1 parent a28e868 commit a25f4fc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions chain/db_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package chain_test

import (
"fmt"
"testing"

"go.sia.tech/core/types"
"go.sia.tech/coreutils/chain"
"go.sia.tech/coreutils/testutil"
)

func TestGetGenesisBlock(t *testing.T) {
n, genesisBlock := testutil.V2Network()
store, tipState, err := chain.NewDBStore(chain.NewMemDB(), n, genesisBlock)
if err != nil {
t.Fatal(err)
}
cm := chain.NewManager(store, tipState)
b, found := cm.Block(types.BlockID{})
fmt.Println(b, found)

}

Check failure on line 22 in chain/db_test.go

View workflow job for this annotation

GitHub Actions / test / test (1.22, ubuntu-latest)

unnecessary trailing newline (whitespace)

Check failure on line 22 in chain/db_test.go

View workflow job for this annotation

GitHub Actions / test / test (1.23, ubuntu-latest)

unnecessary trailing newline (whitespace)

0 comments on commit a25f4fc

Please sign in to comment.