File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -592,6 +592,8 @@ pub(crate) fn handle_command(cli_opts: CliOpts) -> Result<String, Error> {
592592 let split_regex = Regex :: new ( crate :: REPL_LINE_SPLIT_REGEX )
593593 . map_err ( |e| Error :: Generic ( e. to_string ( ) ) ) ?;
594594
595+ let backend = new_backend ( & home_dir) ?;
596+
595597 loop {
596598 let readline = rl. readline ( ">> " ) ;
597599 match readline {
@@ -622,7 +624,6 @@ pub(crate) fn handle_command(cli_opts: CliOpts) -> Result<String, Error> {
622624 let result = match repl_subcommand {
623625 #[ cfg( feature = "regtest-node" ) ]
624626 ReplSubCommand :: Node { subcommand } => {
625- let backend = new_backend ( & home_dir) ?;
626627 match backend. exec_cmd ( subcommand) {
627628 Ok ( result) => Ok ( result) ,
628629 Err ( e) => Ok ( serde_json:: Value :: String ( e. to_string ( ) ) ) ,
@@ -638,7 +639,6 @@ pub(crate) fn handle_command(cli_opts: CliOpts) -> Result<String, Error> {
638639 subcommand :
639640 WalletSubCommand :: OnlineWalletSubCommand ( online_subcommand) ,
640641 } => {
641- let backend = new_backend ( & home_dir) ?;
642642 let blockchain = new_blockchain (
643643 cli_opts. network ,
644644 & wallet_opts,
You can’t perform that action at this time.
0 commit comments