diff --git a/app/Console/Commands/BlockCommand.php b/app/Console/Commands/BlockCommand.php index 8972e1e..ff34288 100644 --- a/app/Console/Commands/BlockCommand.php +++ b/app/Console/Commands/BlockCommand.php @@ -1,28 +1,28 @@ client(); - self::$rpcurl = config('lbry.rpc_url'); - } - /** * Execute the console command. */ public function handle(): void{ + self::$redis = Redis::connection()->client(); + self::$rpcurl = config('lbry.rpc_url'); + $function = $this->argument('function'); if($function){ $this->$function(); @@ -1131,7 +1128,6 @@ class BlockCommand extends Command{ self::lock('parsenewblocks'); echo "Parsing new blocks...\n"; - self::$redis = Redis::connection()->client(); try { // Get the best block hash $req = ['method' => 'getbestblockhash', 'params' => [],'id'=>rand()];