Skip to content

Commit

Permalink
Merge branch 'main' into remove-rpc-state
Browse files Browse the repository at this point in the history
  • Loading branch information
renaynay committed May 9, 2024
2 parents cfa8fa4 + c04bbd2 commit d74f46a
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
go-version: ${{ inputs.go-version }}

- name: golangci-lint
uses: golangci/golangci-lint-action@v5.1.0
uses: golangci/golangci-lint-action@v5.3.0
with:
args: --timeout 10m
version: v1.56
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ else
endif
.PHONY: install

## install-global: Install the celestia-node binary (only for systems that support GNU coreutils, i.e. Linux).
install-global:
@echo "--> Installing Celestia"
@install -v ./build/* -t ${PREFIX}/bin/
@install -v ./build/* -t ${PREFIX}/bin
.PHONY: install-global

## go-install: Build and install the celestia-node binary into the GOBIN directory.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ require (
github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.0 // indirect
github.com/hashicorp/go-getter v1.7.4 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -959,8 +959,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-getter v1.7.0 h1:bzrYP+qu/gMrL1au7/aDvkoOVGUJpeKBgbqRHACAFDY=
github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744=
github.com/hashicorp/go-getter v1.7.4 h1:3yQjWuxICvSpYwqSayAdKRFcvBl1y/vogCxczWSmix0=
github.com/hashicorp/go-getter v1.7.4/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM=
github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
Expand Down
14 changes: 14 additions & 0 deletions pruner/full/window_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package full

import (
"testing"
"time"

"github.com/stretchr/testify/assert"
)

// TestFullWindowConst exists to ensure that any changes to the sampling window
// are deliberate.
func TestFullWindowConst(t *testing.T) {
assert.Equal(t, time.Duration(Window), (30*24*time.Hour)+time.Hour)
}
4 changes: 3 additions & 1 deletion pruner/light/window.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package light

import (
"time"

"github.com/celestiaorg/celestia-node/pruner"
)

// Window is the availability window for light nodes in the Celestia
// network (30 days).
const Window = pruner.AvailabilityWindow(30 * 24 * 60 * 60)
const Window = pruner.AvailabilityWindow(30 * 24 * time.Hour)
14 changes: 14 additions & 0 deletions pruner/light/window_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package light

import (
"testing"
"time"

"github.com/stretchr/testify/assert"
)

// TestLightWindowConst exists to ensure that any changes to the sampling window
// are deliberate.
func TestLightWindowConst(t *testing.T) {
assert.Equal(t, time.Duration(Window), 30*24*time.Hour)
}

0 comments on commit d74f46a

Please sign in to comment.