Skip to content

Commit

Permalink
fix(build): bump deps and fix caddy import (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavovalverde authored Mar 14, 2024
1 parent c0b6833 commit adaedce
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 555 deletions.
2 changes: 1 addition & 1 deletion dnsseed/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"time"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
"github.com/coredns/coredns/core/dnsserver"
"github.com/coredns/coredns/plugin"
clog "github.com/coredns/coredns/plugin/pkg/log"
Expand Down
36 changes: 18 additions & 18 deletions dnsseed/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,60 @@ import (
"testing"
"time"

"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
"github.com/zcashfoundation/dnsseeder/zcash/network"
)

// TestSetup tests the various things that should be parsed by setup.
func TestSetup(t *testing.T) {
tt := []struct {
config string
config string
validConfig bool
magic network.Network
interval time.Duration
bootstrap []string
ttl uint32
magic network.Network
interval time.Duration
bootstrap []string
ttl uint32
}{
{`dnsseed`, false, 0, 0, []string{}, 0},
{`dnsseed mainnet`, false, 0, 0, []string{}, 0},
{`dnsseed { }`, false, 0, 0, []string{}, 0},
{`dnsseed { network }`, false, 0, 0, []string{}, 0},
{`dnsseed { network mainnet }`, true, network.Mainnet, defaultUpdateInterval, []string{}, defaultTTL},
{`dnsseed {
{`dnsseed {
network testnet
crawl_interval 15s
bootstrap_peers
}`,
}`,
false, 0, 0, []string{}, 0,
},
{`dnsseed {
{`dnsseed {
network testnet
crawl_interval
bootstrap_peers 127.0.0.1:8233
}`,
}`,
false, 0, 0, []string{}, 0,
},
{`dnsseed {
{`dnsseed {
network testnet
crawl_interval 15s
bootstrap_peers 127.0.0.1:8233
}`,
}`,
true, network.Testnet, time.Duration(15) * time.Second, []string{"127.0.0.1:8233"}, defaultTTL,
},
{`dnsseed {
{`dnsseed {
network testnet
crawl_interval 15s
bootstrap_peers 127.0.0.1:8233
boop snoot every 15s
}`,
}`,
false, 0, 0, []string{}, 0,
},
{`dnsseed {
{`dnsseed {
network mainnet
crawl_interval 30m
bootstrap_peers 127.0.0.1:8233 127.0.0.2:8233
record_ttl 300
}`,
}`,
true, network.Mainnet, time.Duration(30) * time.Minute, []string{"127.0.0.1:8233", "127.0.0.2:8233"}, 300,
},
}
Expand All @@ -74,7 +74,7 @@ func TestSetup(t *testing.T) {
// bad parse, as expected
continue
}

if opts.networkMagic != test.magic {
t.Errorf("Input: %s wrong network magic", test.config)
}
Expand All @@ -93,4 +93,4 @@ func TestSetup(t *testing.T) {
t.Errorf("Input: %s wrong TTL", test.config)
}
}
}
}
43 changes: 39 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,50 @@
module github.com/zcashfoundation/dnsseeder

go 1.14
go 1.21.0

require (
github.com/btcsuite/btcd v0.22.0-beta
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
github.com/caddyserver/caddy v1.0.5
github.com/coredns/coredns v1.6.9
github.com/miekg/dns v1.1.29
github.com/coredns/caddy v1.1.1
github.com/coredns/coredns v1.11.2
github.com/miekg/dns v1.1.58
github.com/pkg/errors v0.9.1
)

require (
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/lru v1.0.0 // indirect
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/onsi/ginkgo/v2 v2.11.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/quic-go/qtls-go1-20 v0.4.1 // indirect
github.com/quic-go/quic-go v0.40.1 // indirect
go.uber.org/mock v0.3.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.17.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
)

// Currently pointing to "main-zfnd" branch
replace github.com/btcsuite/btcd => github.com/ZcashFoundation/btcd v0.22.0-beta.0.20220607000607-40dc9492aa42
Loading

0 comments on commit adaedce

Please sign in to comment.