Merge branch 'master' into assets
This commit is contained in:
2
api.php
2
api.php
@@ -185,7 +185,7 @@ if ($q == "getAddress") {
|
|||||||
*
|
*
|
||||||
* @apiParam {string} [public_key] Public key
|
* @apiParam {string} [public_key] Public key
|
||||||
* @apiParam {string} [account] Account id / address
|
* @apiParam {string} [account] Account id / address
|
||||||
* @apiParam {numeric} [limit] Number of confirmed transactions, max 1000, min 1
|
* @apiParam {numeric} [limit] Number of confirmed transactions, max 100, min 1
|
||||||
*
|
*
|
||||||
* @apiSuccess {string} block Block ID
|
* @apiSuccess {string} block Block ID
|
||||||
* @apiSuccess {numeric} confirmation Number of confirmations
|
* @apiSuccess {numeric} confirmation Number of confirmations
|
||||||
|
|||||||
@@ -905,7 +905,7 @@ define({ "api": [
|
|||||||
"type": "numeric",
|
"type": "numeric",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"field": "limit",
|
"field": "limit",
|
||||||
"description": "<p>Number of confirmed transactions, max 1000, min 1</p>"
|
"description": "<p>Number of confirmed transactions, max 100, min 1</p>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -905,7 +905,7 @@
|
|||||||
"type": "numeric",
|
"type": "numeric",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"field": "limit",
|
"field": "limit",
|
||||||
"description": "<p>Number of confirmed transactions, max 1000, min 1</p>"
|
"description": "<p>Number of confirmed transactions, max 100, min 1</p>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -647,6 +647,7 @@ if ($current['height'] < $largest_height && $largest_height > 1) {
|
|||||||
|
|
||||||
$resyncing=true;
|
$resyncing=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// needs to be redone due to the assets
|
// needs to be redone due to the assets
|
||||||
// if ($resyncing==true) {
|
// if ($resyncing==true) {
|
||||||
// _log("Resyncing accounts");
|
// _log("Resyncing accounts");
|
||||||
@@ -682,6 +683,7 @@ if ($current['height'] < $largest_height && $largest_height > 1) {
|
|||||||
// $db->run("DELETE FROM masternode WHERE height>:h", [":h"=>$current['height']]);
|
// $db->run("DELETE FROM masternode WHERE height>:h", [":h"=>$current['height']]);
|
||||||
// $db->exec("UNLOCK TABLES");
|
// $db->exec("UNLOCK TABLES");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
util.php
2
util.php
@@ -475,8 +475,10 @@ elseif ($cmd == 'get-address') {
|
|||||||
}
|
}
|
||||||
$rec=$db->single("SELECT SUM(val) FROM transactions WHERE (dst=:id or dst=:alias) AND (height<80000 OR version!=100) and version<111", [":id"=>$x['id'], ":alias"=>$alias]);
|
$rec=$db->single("SELECT SUM(val) FROM transactions WHERE (dst=:id or dst=:alias) AND (height<80000 OR version!=100) and version<111", [":id"=>$x['id'], ":alias"=>$alias]);
|
||||||
$releases=$db->single("SELECT COUNT(1) FROM transactions WHERE dst=:id AND version=103", [":id"=>$x['id']]);
|
$releases=$db->single("SELECT COUNT(1) FROM transactions WHERE dst=:id AND version=103", [":id"=>$x['id']]);
|
||||||
|
|
||||||
if ($releases>0) { //masternode releases
|
if ($releases>0) { //masternode releases
|
||||||
$rec+=$releases*100000;
|
$rec+=$releases*100000;
|
||||||
|
|
||||||
}
|
}
|
||||||
$spent=$db->single("SELECT SUM(val+fee) FROM transactions WHERE public_key=:pub AND version>0", [":pub"=>$x['public_key']]);
|
$spent=$db->single("SELECT SUM(val+fee) FROM transactions WHERE public_key=:pub AND version>0", [":pub"=>$x['public_key']]);
|
||||||
if ($spent==false) {
|
if ($spent==false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user