[#932] adm: Move InitializeContext to util package

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2024-02-01 15:21:51 +03:00
parent b68f7be0b6
commit 77694a2f3b
29 changed files with 809 additions and 794 deletions

View file

@ -17,7 +17,7 @@ import (
)
func forceNewEpochCmd(cmd *cobra.Command, _ []string) error {
wCtx, err := NewInitializeContext(cmd, viper.GetViper())
wCtx, err := util2.NewInitializeContext(cmd, viper.GetViper())
if err != nil {
return fmt.Errorf("can't to initialize context: %w", err)
}
@ -48,7 +48,7 @@ func forceNewEpochCmd(cmd *cobra.Command, _ []string) error {
return err
}
func emitNewEpochCall(bw *io.BufBinWriter, wCtx *InitializeContext, nmHash util.Uint160) error {
func emitNewEpochCall(bw *io.BufBinWriter, wCtx *util2.InitializeContext, nmHash util.Uint160) error {
curr, err := unwrap.Int64(wCtx.ReadOnlyInvoker.Call(nmHash, "epoch"))
if err != nil {
return errors.New("can't fetch current epoch from the netmap contract")