diff --git a/chain/beacon/drand/drand.go b/chain/beacon/drand/drand.go index 9769a8436..eb51a2af3 100644 --- a/chain/beacon/drand/drand.go +++ b/chain/beacon/drand/drand.go @@ -23,15 +23,11 @@ import ( "github.com/filecoin-project/lotus/chain/beacon" "github.com/filecoin-project/lotus/chain/types" + "github.com/filecoin-project/lotus/node/modules/dtypes" ) var log = logging.Logger("drand") -type DrandConfig struct { - Servers []string - ChainInfoJSON string -} - type drandPeer struct { addr string tls bool @@ -61,7 +57,7 @@ type DrandBeacon struct { localCache map[uint64]types.BeaconEntry } -func NewDrandBeacon(genesisTs, interval uint64, ps *pubsub.PubSub, config DrandConfig) (*DrandBeacon, error) { +func NewDrandBeacon(genesisTs, interval uint64, ps *pubsub.PubSub, config dtypes.DrandConfig) (*DrandBeacon, error) { if genesisTs == 0 { panic("what are you doing this cant be zero") } diff --git a/node/modules/services.go b/node/modules/services.go index ad7eb056f..2cba3a0be 100644 --- a/node/modules/services.go +++ b/node/modules/services.go @@ -124,9 +124,5 @@ func RandomBeacon(p RandomBeaconParams, _ dtypes.AfterGenesisSet) (beacon.Random } //return beacon.NewMockBeacon(build.BlockDelay * time.Second) - config := drand.DrandConfig{ - Servers: p.DrandConfig.Servers, - ChainInfoJSON: p.DrandConfig.ChainInfoJSON, - } - return drand.NewDrandBeacon(gen.Timestamp, build.BlockDelay, p.PubSub, config) + return drand.NewDrandBeacon(gen.Timestamp, build.BlockDelay, p.PubSub, p.DrandConfig) }