node+consensus: handshaker initialization (#7283)

This mostly just pushes more of initialization out of the node package.
This commit is contained in:
Sam Kleinman
2021-11-15 18:28:52 +00:00
committed by GitHub
parent f28d629e28
commit a15ae5b53a
6 changed files with 63 additions and 66 deletions
+5 -4
View File
@@ -9,8 +9,9 @@ import (
var ReplayCmd = &cobra.Command{
Use: "replay",
Short: "Replay messages from WAL",
Run: func(cmd *cobra.Command, args []string) {
consensus.RunReplayFile(config.BaseConfig, config.Consensus, false)
RunE: func(cmd *cobra.Command, args []string) error {
return consensus.RunReplayFile(logger, config.BaseConfig, config.Consensus, false)
},
}
@@ -19,7 +20,7 @@ var ReplayCmd = &cobra.Command{
var ReplayConsoleCmd = &cobra.Command{
Use: "replay-console",
Short: "Replay messages from WAL in a console",
Run: func(cmd *cobra.Command, args []string) {
consensus.RunReplayFile(config.BaseConfig, config.Consensus, true)
RunE: func(cmd *cobra.Command, args []string) error {
return consensus.RunReplayFile(logger, config.BaseConfig, config.Consensus, true)
},
}