Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Fixed some bugs and added a few features
Browse files Browse the repository at this point in the history
FEATURE: Updated voluntary node upload to Dactual Nodemaps.
BUG: Commands for resetting the blockchain using the CLI did not connect to the config.
BUG: GitHub issue #20: Only inbound connections were shown in the node list.
FEATURE: Donate to G-DASH using CoinRequest banner.
  • Loading branch information
Bastijn committed Nov 6, 2019
1 parent 6fc47cc commit dd3c605
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
6 changes: 4 additions & 2 deletions about.php
Expand Up @@ -56,11 +56,13 @@
<br>
<img src="images/donations.png" border="0" width="175" height="175">
<br>
<br><br><br>
<p class="lead">Sponsors</p>
<a href="https://nocks.com/trade?utm_source=gdash" target="_blank"><img class="img-responsive" src="https://g-dash.nl/images/nocks.jpg" border="0"></a>
<!--<a href="https://nocks.com/trade?utm_source=gdash" target="_blank"><img class="img-responsive" src="https://g-dash.nl/images/nocks.jpg" border="0"></a>-->
Send me a message if you would like to become a sponsor!
<br><br><br>
<p class="lead">License and Copyright</p>
GNU General Public License v3.0<br>
Expand Down
7 changes: 4 additions & 3 deletions ajax/node.php
Expand Up @@ -30,8 +30,10 @@
$cityarray = array();

foreach($gpeerinfo as $innerArray) {
if($innerArray['inbound']=="1") {
$ginboundconnections++;
if($innerArray['inbound']=="1") {
$ginboundconnections++;
}

$subvers = str_replace("/", "", $innerArray['subver']);
$subversarray[$subvers]++;
$inboundipport = $innerArray['addr'];
Expand All @@ -41,7 +43,6 @@
$ipinfo_cityname = $ipinfo['city'];
$countryarray[$ipinfo_countryname]++;
$cityarray[$ipinfo_cityname]++;
}
}

//Location info
Expand Down
12 changes: 12 additions & 0 deletions changelog.php
Expand Up @@ -23,6 +23,18 @@
<p class="lead">G-DASH changelog</p>
</h1>
<div class="panel panel-default">
<div class="panel-heading"><b>1.3</b></div>
<div class="panel-body">
<ul>
<li>FEATURE: Updated voluntary node upload to Dactual Nodemaps.</li>
<li>BUG: Commands for resetting the blockchain using the CLI did not connect to the config.</li>
<li>BUG: GitHub issue #20: Only inbound connections were shown in the node list.</li>
<li>FEATURE: Donate to G-DASH using CoinRequest banner.</li>
</ul>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><b>1.2</b></div>
<div class="panel-body">
Expand Down
6 changes: 3 additions & 3 deletions console.php
@@ -1,5 +1,5 @@
<?php
function resetChain($resetlevel){
function resetChain($resetlevel, $CONFIG){
//Connect to GuldenD
$gulden = new Gulden($CONFIG['rpcuser'],$CONFIG['rpcpass'],$CONFIG['rpchost'],$CONFIG['rpcport']);

Expand Down Expand Up @@ -153,10 +153,10 @@ function resetChain($resetlevel){

//If argument is to reset the Gulden chain
} elseif($argv[1]=="reset_blockchain_partial") {
resetChain(0);
resetChain(0, $CONFIG);
//If argument is to reset the Gulden chain
} elseif($argv[1]=="reset_blockchain") {
resetChain(1);
resetChain(1, $CONFIG);
//If the argument is help
} elseif($argv[1]=="help") {
echo "-----------------------------------------------" . PHP_EOL;
Expand Down
2 changes: 1 addition & 1 deletion js/dash/index.js
@@ -1,4 +1,4 @@
$(document).ready(function() {
//Load the banner
//$("#sidebar").append('<br><br><small>Sponsored by</small><br><a href="https://nocks.com/trade?utm_source=gdash" target="_blank"><img class="img-responsive" src="https://g-dash.nl/images/nocks.jpg" border="0"></a>');
$("#sidebar").append('<br><br><small>Donate using CoinRequest:</small><br><a href="https://coinrequest.io/request/pThndSEc2vy1X1b" target="_blank"><img class="img-responsive" src="https://g-dash.nl/images/coinrequest.png" border="0"></a>');
});
8 changes: 3 additions & 5 deletions settings.php
Expand Up @@ -89,7 +89,7 @@

//Twice per hour, random between 1-600 seconds
$randomstatstime = rand(1,600);
$nodestatscronentry = "*/10 * * * * sleep ".$randomstatstime."; ".$CONFIG['guldenlocation']."Gulden-cli -datadir=".$CONFIG['datadir']." getpeerinfo | curl -X POST -H \"Content-Type:application/json\" -d @- https://guldennodes.com/endpoint/ >/dev/null 2>&1";
$nodestatscronentry = "*/10 * * * * sleep ".$randomstatstime."; ".$CONFIG['guldenlocation']."Gulden-cli -datadir=".$CONFIG['datadir']." getpeerinfo | curl -X POST -H \"Content-Type:application/json\" -d @- https://dactual.com/api/v1/peerinfo.php/ >/dev/null 2>&1";
$currentcron = explode(PHP_EOL, shell_exec('crontab -l'));

if($nodestatscron=="0" && $CONFIG['nodeupload']=="1") {
Expand Down Expand Up @@ -449,10 +449,8 @@
<label>
<input type="checkbox" id="nodeupload" name="nodeupload" aria-describedby="nodeuploadhelp" value="1" <?php if($CONFIG['nodeupload']=="1") { echo "checked='checked'"; } ?>>Upload node statistics</label><br>
<small id="nodeuploadhelp" class="form-text text-muted">Help the Gulden network by uploading your node statistics. You can see the stats
of your node and a spider web showing all your connections on
<a href="https://guldennodes.com/?crawler" target="_blank">
https://guldennodes.com/?crawler</a><br>(Note: This link only works if you visit
this website from the same network as your node. Otherwise, use "?crawler=YourIP")</small>
and a map of the nodes on <a href='https://www.dactual.com/nodemaps.php' target='_blank'>
Dactual</a></small>
</div>

<div class="checkbox">
Expand Down

0 comments on commit dd3c605

Please sign in to comment.