Fix tests
This commit is contained in:
parent
2ef8c1ae0c
commit
2fecf3a8f1
@ -27,6 +27,11 @@ var topic = "/fil/headnotifs/"
|
||||
|
||||
func init() {
|
||||
genBytes := build.MaybeGenesis()
|
||||
if len(genBytes) == 0 {
|
||||
topic = ""
|
||||
return
|
||||
}
|
||||
|
||||
bs := blockstore.NewBlockstore(datastore.NewMapDatastore())
|
||||
|
||||
c, err := car.LoadCar(bs, bytes.NewReader(genBytes))
|
||||
@ -49,6 +54,11 @@ var upgrader = websocket.Upgrader{
|
||||
}
|
||||
|
||||
func main() {
|
||||
if topic == "" {
|
||||
fmt.Println("FATAL: No genesis found")
|
||||
return
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
protec, err := pnet.NewProtector(strings.NewReader(lp2p.LotusKey))
|
||||
|
Loading…
Reference in New Issue
Block a user