Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ jobs:
go-version: '1.23.3'

- name: Run linter
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v9
with:
version: latest
version: v2.6.1
12 changes: 12 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "2"

run:
timeout: 5m
tests: true

linters:
default: standard
settings:
govet:
disable:
- unsafeptr
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ lint:
golangci-lint run ./...

deps:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1

update-kernel:
git subtree pull --prefix=depend/bitcoin https://github.com/bitcoin/bitcoin.git master --squash
Expand Down
6 changes: 5 additions & 1 deletion kernel/chainstate_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ func (s *ChainstateManagerTestSuite) Setup(t *testing.T) {
if err != nil {
t.Fatalf("Failed to create temp dir: %v", err)
}
t.Cleanup(func() { os.RemoveAll(tempDir) })
t.Cleanup(func() {
if err := os.RemoveAll(tempDir); err != nil {
t.Errorf("Failed to remove temp dir: %v", err)
}
})

dataDir := filepath.Join(tempDir, "data")
blocksDir := filepath.Join(tempDir, "blocks")
Expand Down
4 changes: 2 additions & 2 deletions kernel/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func NewContext(options *ContextOptions) (*Context, error) {
//
// Returns an error if the interrupt signal cannot be delivered.
func (ctx *Context) Interrupt() error {
result := C.btck_context_interrupt((*C.btck_Context)(ctx.handle.ptr))
result := C.btck_context_interrupt((*C.btck_Context)(ctx.ptr))
if result != 0 {
return &InternalError{"Context interrupt failed"}
}
Expand All @@ -65,5 +65,5 @@ func (ctx *Context) Interrupt() error {
// The context is reference-counted internally, so this operation is efficient and does
// not duplicate the underlying data.
func (ctx *Context) Copy() *Context {
return newContext((*C.btck_Context)(ctx.handle.ptr), false)
return newContext((*C.btck_Context)(ctx.ptr), false)
}
Loading