Handle Network out of range (#347)

This commit is contained in:
Misha Bragin
2022-06-02 12:56:02 +02:00
committed by GitHub
parent 2e5d4ba6fa
commit 60ac8c3268
3 changed files with 16 additions and 12 deletions

View File

@@ -346,7 +346,10 @@ func (am *DefaultAccountManager) AddPeer(
}
network := account.Network
nextIp, _ := AllocatePeerIP(network.Net, takenIps)
nextIp, err := AllocatePeerIP(network.Net, takenIps)
if err != nil {
return nil, err
}
newPeer := &Peer{
Key: peer.Key,