Update README.md with installation instructions #30
84
README.md
|
@ -0,0 +1,84 @@
|
|||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
# LBRY Block Explorer
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
A simple PHP block explorer for browsing transactions and claims on the [LBRY](https://lbry.io) blockchain. The explorer was developed using CakePHP which is a model-view-controller (MVC) PHP framework.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
"which is a model-view-controller (MVC) PHP framework" could probably be removed, but not a strong opinion "which is a model-view-controller (MVC) PHP framework" could probably be removed, but not a strong opinion
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
## Installation
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
There are some prerequisites that need to be installed before the explorer can be accessed.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Web server - Apache, caddy or nginx
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* lbrycrd with txindex turned on
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Python claims decoder (https://github.com/cryptodevorg/lbry-decoder)
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* MariaDB 10.2 or higher
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Redis Server (optional, only required for the CakePHP redis cache engine, or to run `forevermempool`)
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* PHP 7.2 or higher
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* php-fpm
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* igbinary extension (https://github.com/igbinary/igbinary)
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* phpredis extension (https://github.com/phpredis/phpredis)
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* composer (PHP package manager)
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
### Installation steps
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Clone the Github repository. `git clone https://github.com/lbryio/block-explorer`
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Create a MariaDB database using the DDL found in `block-explorer/sql/lbryexplorer.ddl.sql`
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Change the working directory to the cloned directory and run composer.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
```
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
cd block-explorer
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
composer update
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
```
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Create the directories, `tmp` and `logs` in the `block-explorer` folder if they have not been created yet, and make sure that they are writable by the web server.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Copy `config/app.default.php` to `config/app.php`. Edit the database connection values to correspond to your environment.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Copy `config/lbry.default.php` to `config/lbry.php`. Update the values for LBRY RPC URL and the Redis URL to correspond to your environment.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Configure your web server with the host root folder set to `<path to>/block-explorer/webroot` where `<path to>` is the absolute path to the configuraiton. Here is a sample nginx configuration. You can make changes to this configuration to correspond to your environment.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
```
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
server {
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
This could probably be checked-in rather than inlined? Another point I'm ambivalent about This could probably be checked-in rather than inlined? Another point I'm ambivalent about
Usually makes sense to have sample configuration files with the actual configuration files ignored by git, so that subsequent edits with actual credentials don't get pushed to the repository. Usually makes sense to have sample configuration files with the actual configuration files ignored by git, so that subsequent edits with actual credentials don't get pushed to the repository.
|
||||
listen 80;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
server_name my.explorer.com;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
root /var/www/block-explorer/webroot;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
index index.php;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
location / {
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
}
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
# pass the PHP scripts to FastCGI server listening on the php-fpm socket
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
location ~ \.php$ {
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
try_files $uri =404;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
include /etc/nginx/fastcgi_params;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
fastcgi_index index.php;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
fastcgi_ignore_client_abort on;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
fastcgi_param PHP_AUTH_USER $remote_user;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
fastcgi_param PHP_AUTH_PW $http_authorization;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
}
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
}
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
```
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
* Restart your web server.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
### Cron jobs
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
There are a few scripts which can be set up as cron jobs or scheduled tasks.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
#### blocks.sh
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
Detect new LBRY blocks. Can also be configured to be triggered using the lbrycrd `blocknotify` flag. This cron will create new blocks obtained from lbrycrd starting from the highest block number in the database, and then create the corresponding block transactions. If there are pending transactions created by the forevermempool script, they will be automatically associated with the respective blocks.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
#### claimindex.sh
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
Create claims found on the LBRY blockchain in the database. This requires the Python decoder to be running in the background.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
#### pricehistory.sh
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
Get the current LBC price in USD and store the value in the `PriceHistory` table. This also caches the most recent price in Redis.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
#### forever.sh
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
Run the `forevermempool` script, and restart if necessary. The `forevermempool` script checks the LBRY blockchain mempool every second and creates transactions found in the database. The script makes use of Redis for caching the pending transation IDs.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
## Usage
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
Launch the URL for the configured web server root in a browser.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
## Running from Source
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
There are no particular steps required to run from source.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
## Contributing
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
Contributions to this project are welcome, encouraged, and compensated. For more details, see https://lbry.io/faq/contributing
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
## License
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
This project is MIT licensed. For the full license, see [LICENSE](LICENSE).
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
## Security
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
We take security seriously. Please contact security@lbry.io regarding any security issues. Our PGP key is [here](https://keybase.io/lbry/key.asc) if you need it.
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
## Contact
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
||||
The primary contact for this project is [@akinwale](https://github.com/akinwale) (akinwale@lbry.io)
|
||||
link lbrycrd link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section). I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed. This section can just be removed.
|
11
config/lbry.default.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'Lbry' => [
|
||||
'RpcUrl' => 'http://user:password@127.0.0.1:9245',
|
||||
],
|
||||
|
||||
'Redis' => [
|
||||
'Url' => 'tcp://127.0.0.1:6379',
|
||||
]
|
||||
];
|
|
@ -1,4 +1,4 @@
|
|||
l--DROP DATABASE IF EXISTS lbry;
|
||||
--DROP DATABASE IF EXISTS lbry;
|
||||
CREATE DATABASE lbry DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
USE lbry;
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class MainController extends AppController {
|
|||
public function initialize() {
|
||||
parent::initialize();
|
||||
self::$rpcurl = Configure::read('Lbry.RpcUrl');
|
||||
$this->redis = new \Predis\Client('tcp://127.0.0.1:6379');
|
||||
$this->redis = new \Predis\Client(Configure::read('Redis.Url'));
|
||||
try {
|
||||
$this->redis->info('mem');
|
||||
} catch (\Predis\Connection\ConnectionException $e) {
|
||||
|
|
|
@ -128,7 +128,7 @@ class AuxShell extends Shell {
|
|||
self::lock('pricehistory');
|
||||
|
||||
$conn = ConnectionManager::get('default');
|
||||
$redis = new \Predis\Client('tcp://127.0.0.1:6379');
|
||||
$redis = new \Predis\Client(Configure::read('Redis.Url'));
|
||||
|
||||
try {
|
||||
// Only allow 5-minute update intervals
|
||||
|
|
|
@ -13,17 +13,18 @@ class BlockShell extends Shell {
|
|||
|
||||
public static $rpcurl;
|
||||
|
||||
public static $redisurl;
|
||||
|
||||
const mempooltxkey = 'lbc.mempooltx';
|
||||
|
||||
const pubKeyAddress = [0, 85];
|
||||
|
||||
const scriptAddress = [5, 122];
|
||||
|
||||
const redisurl = 'tcp://127.0.0.1:6379';
|
||||
|
||||
public function initialize() {
|
||||
parent::initialize();
|
||||
self::$rpcurl = Configure::read('Lbry.RpcUrl');
|
||||
self::$redisurl = Configure::read('Redis.Url');
|
||||
$this->loadModel('Blocks');
|
||||
$this->loadModel('Addresses');
|
||||
$this->loadModel('Claims');
|
||||
|
@ -2073,7 +2074,7 @@ print_r($response); print_r($json);
|
|||
}
|
||||
|
||||
public static function _init_redis() {
|
||||
$redis = new \Predis\Client(self::redisurl);
|
||||
$redis = new \Predis\Client(self::$redisurl);
|
||||
try {
|
||||
$redis->info('mem');
|
||||
} catch (\Predis\Connection\ConnectionException $e) {
|
||||
|
|
link lbrycrd
I think there should be newlines between paragraphs and the next header (throughout this section).
This section can just be removed.