File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ import (
2222 "fmt"
2323 "io"
2424 "math/big"
25- "os"
2625 "sync"
2726 "sync/atomic"
2827 "time"
@@ -2757,12 +2756,12 @@ func (bc *BlockChain) UpdateM1() error {
27572756 // get masternodes information from smart contract
27582757 client , err := bc .GetClient ()
27592758 if err != nil {
2760- return err
2759+ return fmt . Errorf ( "failed to get client: %w" , err )
27612760 }
27622761 addr := common .MasternodeVotingSMCBinary
27632762 validator , err := contractValidator .NewXDCValidator (addr , client )
27642763 if err != nil {
2765- return err
2764+ return fmt . Errorf ( "failed to create validator contract: %w" , err )
27662765 }
27672766 opts := new (bind.CallOpts )
27682767
@@ -2794,7 +2793,7 @@ func (bc *BlockChain) UpdateM1() error {
27942793 }
27952794 if len (ms ) == 0 {
27962795 log .Error ("No masternode found. Stopping node" )
2797- os . Exit ( 1 )
2796+ return errors . New ( "no masternode found" )
27982797 } else {
27992798 sort .Slice (ms , func (i , j int ) bool {
28002799 return ms [i ].Stake .Cmp (ms [j ].Stake ) >= 0
You can’t perform that action at this time.
0 commit comments