fix: ineffassign

This commit is contained in:
Richard Ramos 2021-11-06 09:20:01 -04:00
parent 12a1daae74
commit f561e217aa
1 changed files with 12 additions and 0 deletions

View File

@ -42,13 +42,22 @@ func main() {
return return
} }
prvKey1, err := crypto.HexToECDSA(key1) prvKey1, err := crypto.HexToECDSA(key1)
if err != nil {
log.Error("Invalid key")
return
}
key2, err := randomHex(32) key2, err := randomHex(32)
if err != nil { if err != nil {
log.Error("Could not generate random key") log.Error("Could not generate random key")
return return
} }
prvKey2, err := crypto.HexToECDSA(key2) prvKey2, err := crypto.HexToECDSA(key2)
if err != nil {
log.Error("Invalid key")
return
}
ctx := context.Background() ctx := context.Background()
@ -69,6 +78,9 @@ func main() {
node.WithHostAddress([]*net.TCPAddr{hostAddr2}), node.WithHostAddress([]*net.TCPAddr{hostAddr2}),
node.WithWakuFilter(false), node.WithWakuFilter(false),
) )
if err != nil {
panic(err)
}
_, err = lightNode.AddPeer(fullNode.ListenAddresses()[0], filter.FilterID_v20beta1) _, err = lightNode.AddPeer(fullNode.ListenAddresses()[0], filter.FilterID_v20beta1)
if err != nil { if err != nil {