adm: Allow concurrent epoch ticks #968

Merged
fyrchik merged 1 commit from fyrchik/frostfs-node:fix-adm-tick into master 2024-02-08 08:10:27 +00:00

View file

@ -37,18 +37,14 @@ func forceNewEpochCmd(cmd *cobra.Command, _ []string) error {
return err
}
if err := wCtx.sendConsensusTx(bw.Bytes()); err != nil {
return err
if err = wCtx.sendConsensusTx(bw.Bytes()); err == nil {
err = wCtx.awaitTx()
}
if err := wCtx.awaitTx(); err != nil {
if strings.Contains(err.Error(), "invalid epoch") {
cmd.Println("Epoch has already ticked.")
return nil
}
return err
if err != nil && strings.Contains(err.Error(), "invalid epoch") {
cmd.Println("Epoch has already ticked.")
return nil
}
return nil
return err
}
func emitNewEpochCall(bw *io.BufBinWriter, wCtx *initializeContext, nmHash util.Uint160) error {