adm: Allow concurrent epoch ticks #968
1 changed files with 6 additions and 10 deletions
|
@ -37,18 +37,14 @@ func forceNewEpochCmd(cmd *cobra.Command, _ []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := wCtx.sendConsensusTx(bw.Bytes()); err != nil {
|
if err = wCtx.sendConsensusTx(bw.Bytes()); err == nil {
|
||||||
return err
|
err = wCtx.awaitTx()
|
||||||
}
|
}
|
||||||
|
if err != nil && strings.Contains(err.Error(), "invalid epoch") {
|
||||||
if err := wCtx.awaitTx(); err != nil {
|
|
||||||
if strings.Contains(err.Error(), "invalid epoch") {
|
|
||||||
cmd.Println("Epoch has already ticked.")
|
cmd.Println("Epoch has already ticked.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func emitNewEpochCall(bw *io.BufBinWriter, wCtx *initializeContext, nmHash util.Uint160) error {
|
func emitNewEpochCall(bw *io.BufBinWriter, wCtx *initializeContext, nmHash util.Uint160) error {
|
||||||
|
|
Loading…
Reference in a new issue