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
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
VERSION := $(shell git describe --tags --always)
CONFIG_URL := https://cfg.rpchub.io/agg/op-default.json

GOLDFLAGS += -X github.com/BlockPILabs/aggregator/version.Version=$(VERSION)
GOLDFLAGS := -X github.com/BlockPILabs/aggregator/version.Version=$(VERSION)
GO_OPLDFLAGS := -X github.com/BlockPILabs/aggregator/config.DefaultConfigUrl=$(CONFIG_URL)
GOFLAGS = -ldflags "$(GOLDFLAGS)"


all: build

.PHONY: build
build:
go build $(GOFLAGS) -o ./build/ ./cmd/aggregator
CGO_ENABLED=0 go build -ldflags "$(GOLDFLAGS)" -o ./build/ ./cmd/aggregator
build-op:
CGO_ENABLED=0 go build -ldflags "$(GOLDFLAGS) $(GO_OPLDFLAGS)" -o ./build/ ./cmd/aggregator
#build-windows:
# CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(GOFLAGS) -o ./build/ ./cmd/aggregator
#build-mac:
# CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build $(GOFLAGS) -o ./build/ ./cmd/aggregator
clean:
rm -rf build/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ curl -u rpchub:<password> -X POST 'http://localhost:8012/config' --header 'Conte
## Reset configuration
1. Stop the aggregator.
2. Delete the configuration directory `rm -rf $HOME/.rpchub/aggregator/`.
3. Restart the aggregator
3. Restart the aggregator
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
var (
logger = log.Module("config")
locker = sync.Mutex{}
defaultConfigUrl = "https://cfg.rpchub.io/agg/default.json"
DefaultConfigUrl = "https://cfg.rpchub.io/agg/default.json"
defaultPhishingDb = "https://cfg.rpchub.io/agg/scam-addresses.json"

_Config = &Config{
Expand Down Expand Up @@ -94,7 +94,7 @@ func LoadDefault() *Config {

retries := 0
for {
statusCode, data, err := (&fasthttp.Client{}).GetTimeout(nil, defaultConfigUrl, time.Second*5)
statusCode, data, err := (&fasthttp.Client{}).GetTimeout(nil, DefaultConfigUrl, time.Second*5)
if err == nil && statusCode == 200 {
err = json.Unmarshal(data, &cfg)
if err == nil {
Expand Down
5 changes: 5 additions & 0 deletions funding.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"opRetro": {
"projectId": "0xc8baf94c13404f1f5f1fb13de286c052bae58919ca80fd2be5d61312be096b35"
}
}