Compare commits

...
Author SHA1 Message Date
Akinwale Ariwodola e8eaf19490 fix issue with claim names being returned with a hash 2019-01-26 13:41:10 +01:00
Niko fae8b3e98a Merge pull request #47 from lbryio/cache2
Adds caching to vulnerable API call
2019-01-04 13:57:14 +01:00
Niko 07d937d0ef Merge pull request #48 from marcdeb1/fix_mining_chart
Fix mining chart
2019-01-03 00:37:29 +01:00
marcdeb1 0df9658b87 composer 2018-12-12 00:40:49 +01:00
marcdeb1 5b7c9f7e72 Fixing mining inflation chart bug 2018-12-12 00:22:39 +01:00
2 changed files with 6 additions and 2 deletions

No files matched your search

+5
View File
@@ -274,6 +274,7 @@ class BlockShell extends Shell {
self::unlock('buildindex');
}
// TODO: Refactor for unique claim identification by claim_id instead of using the claim name.
protected function _getclaimfortxout($pubkeyasm, $tx_hash, $vout, $tx_time = null) {
$claim_data = null;
$claim_stream_data = null;
@@ -295,6 +296,10 @@ class BlockShell extends Shell {
if ($json) {
$claim = json_decode($json);
if ($claim) {
if (strpos($claim_name, '#') !== false) {
$claim_name = substr($claim_name, 0, strpos($claim_name, '#'));
}
$req = ['method' => 'getvalueforname', 'params' => [$claim_name]];
$json = null;
try {
+1 -2
View File
@@ -85,7 +85,6 @@ function buildChartData(blockData) {
inflationRate = ((supply - lastYearSupply) / lastYearSupply) * 100;
if(i % skip == 0) { // Only push 1/<skip> of all blocks to optimize data loading
chartData.push({
date: new Date(blockTime * 1000),
date: new Date(blockTime * 1000),
AvailableSupply: supply,
RewardLBC: reward,
@@ -99,7 +98,7 @@ function buildChartData(blockData) {
function loadChartData() {
var api_url = "https://chainquery.lbry.io/api/sql?query=";
var query = "SELECT id, block_time FROM block";
var query = "SELECT height, block_time FROM block WHERE confirmations > 0 ORDER BY height";
var url = api_url + query;
var loadProgress = $('.mining-inflation-chart-container .load-progress');
$.ajax({