[#476] cmd/netmap: Make network handlers async

Make netmap handlers that do network
communication execute asynchronously.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
remotes/KirillovDenis/release/v0.21.1
Pavel Karpy 2021-04-15 13:24:43 +03:00 committed by Alex Vanin
parent 91e0f4b370
commit a04f40d616
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ func initNetmapService(c *cfg) {
})
if c.cfgNetmap.reBootstrapEnabled {
addNewEpochNotificationHandler(c, func(ev event.Event) {
addNewEpochAsyncNotificationHandler(c, func(ev event.Event) {
n := ev.(netmapEvent.NewEpoch).EpochNumber()
if n%c.cfgNetmap.reBootstrapInterval == 0 {
@ -86,7 +86,7 @@ func initNetmapService(c *cfg) {
})
}
addNewEpochNotificationHandler(c, func(ev event.Event) {
addNewEpochAsyncNotificationHandler(c, func(ev event.Event) {
e := ev.(netmapEvent.NewEpoch).EpochNumber()
ni, err := c.netmapLocalNodeState(e)