Skip to content

Commit 618ef51

Browse files
Merge pull request #5 from BlockPILabs/op
merge
2 parents c1edb61 + fbf3ba0 commit 618ef51

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

Makefile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
VERSION := $(shell git describe --tags --always)
2+
CONFIG_URL := https://cfg.rpchub.io/agg/op-default.json
23

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

8+
69
all: build
710

811
.PHONY: build
912
build:
10-
go build $(GOFLAGS) -o ./build/ ./cmd/aggregator
13+
CGO_ENABLED=0 go build -ldflags "$(GOLDFLAGS)" -o ./build/ ./cmd/aggregator
14+
build-op:
15+
CGO_ENABLED=0 go build -ldflags "$(GOLDFLAGS) $(GO_OPLDFLAGS)" -o ./build/ ./cmd/aggregator
16+
#build-windows:
17+
# CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build $(GOFLAGS) -o ./build/ ./cmd/aggregator
18+
#build-mac:
19+
# CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build $(GOFLAGS) -o ./build/ ./cmd/aggregator
1120
clean:
1221
rm -rf build/*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ curl -u rpchub:<password> -X POST 'http://localhost:8012/config' --header 'Conte
3939
## Reset configuration
4040
1. Stop the aggregator.
4141
2. Delete the configuration directory `rm -rf $HOME/.rpchub/aggregator/`.
42-
3. Restart the aggregator
42+
3. Restart the aggregator

config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
var (
1919
logger = log.Module("config")
2020
locker = sync.Mutex{}
21-
defaultConfigUrl = "https://cfg.rpchub.io/agg/default.json"
21+
DefaultConfigUrl = "https://cfg.rpchub.io/agg/default.json"
2222
defaultPhishingDb = "https://cfg.rpchub.io/agg/scam-addresses.json"
2323

2424
_Config = &Config{
@@ -94,7 +94,7 @@ func LoadDefault() *Config {
9494

9595
retries := 0
9696
for {
97-
statusCode, data, err := (&fasthttp.Client{}).GetTimeout(nil, defaultConfigUrl, time.Second*5)
97+
statusCode, data, err := (&fasthttp.Client{}).GetTimeout(nil, DefaultConfigUrl, time.Second*5)
9898
if err == nil && statusCode == 200 {
9999
err = json.Unmarshal(data, &cfg)
100100
if err == nil {

funding.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"opRetro": {
3+
"projectId": "0xc8baf94c13404f1f5f1fb13de286c052bae58919ca80fd2be5d61312be096b35"
4+
}
5+
}

0 commit comments

Comments
 (0)