[CHAIN] fix some bugs of verifing blockchain
aergosvr doesn't register P2PSvc in component manager not to receive message from other node
@@ -167,7 +167,11 @@ func rootRun(cmd *cobra.Command, args []string) {
// Register services to Hub. Don't need to do nil-check since Register
// function skips nil parameters.
+ if !cfg.Blockchain.VerifyOnly {
compMng.Register(chainSvc, mpoolSvc, rpcSvc, syncSvc, p2pSvc, accountSvc, pmapSvc)
+ } else {
+ compMng.Register(chainSvc, mpoolSvc, rpcSvc)
+ }
consensusSvc, err := impl.New(cfg, compMng, chainSvc, p2pSvc, rpcSvc)
if err != nil {
