8001ed3030
Adding Cloudflare ensures additional redundancy. Switching to HTTP for PL nodes reduces latency and cost. Randomness is verified after being received.
26 lines
579 B
Go
26 lines
579 B
Go
package drand
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
dchain "github.com/drand/drand/chain"
|
|
hclient "github.com/drand/drand/client/http"
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/filecoin-project/lotus/build"
|
|
)
|
|
|
|
func TestPrintGroupInfo(t *testing.T) {
|
|
server := build.DrandConfigs[build.DrandDevnet].Servers[0]
|
|
c, err := hclient.New(server, nil, nil)
|
|
assert.NoError(t, err)
|
|
cg := c.(interface {
|
|
FetchChainInfo(groupHash []byte) (*dchain.Info, error)
|
|
})
|
|
chain, err := cg.FetchChainInfo(nil)
|
|
assert.NoError(t, err)
|
|
err = chain.ToJSON(os.Stdout)
|
|
assert.NoError(t, err)
|
|
}
|