Commit for New API - Average Block Time

This commit is contained in:
shunmugam 2019-09-18 13:52:45 +05:30
parent f967c4d76b
commit 012cf43e52
4 changed files with 6 additions and 4 deletions

View File

@ -103,7 +103,8 @@
"getblocktime" : "Nimmt einen Höhenparameter und gibt die unixtime des Blocks zurück.",
"takes":"nimmt ein",
"Note" : "Hinweis",
"reward" : "Gibt die aktuelle Blockbelohnung zurück"
"reward" : "Gibt die aktuelle Blockbelohnung zurück",
"averageblocktime" : "Gibt die durchschnittliche Blockierungszeit der letzten 24 Stunden zurück"
},
"commit-id-view": {
"output-commit":"Output Commit",

View File

@ -103,7 +103,8 @@
"getblocktime" : " parameter and returns unixtime of the block.",
"takes" : "takes a",
"Note" : "Note",
"reward" : "returns current block reward"
"reward" : "returns current block reward",
"averageblocktime" : "returns average block time of past 24 hour"
},
"commit-id-view": {
"output-commit":"Output Commit",

View File

@ -358,8 +358,7 @@ const averageblockdifficulty = async() => {
)
.catch(err_msg => {
return(err_msg);
});
console.log(BlockchainBlockPerSecondQuery);
});
return BlockchainBlockPerSecondQuery[0]['period'];
}

View File

@ -15,6 +15,7 @@
<li><b><a target="_blank" href="./api?q=getdifficulty-cuckoo">getdifficulty-cuckoo</a></b>: {{'api-view.getdifficulty-cuckoo' | translate}}</li>
<li><b><a target="_blank" href="./api?q=totalcoins">totalcoins</a></b>: {{'api-view.totalcoins' | translate}}</li>
<li><b><a target="_blank" href="./api?q=reward">reward</a></b>: {{'api-view.reward' | translate}}</li>
<li><b><a target="_blank" href="./api?q=average-blocktime">average-blocktime</a></b>: {{'api-view.averageblocktime' | translate}}</li>
</ul>
<h4 class="txt_primary">{{'api-view.Block-Queries' | translate}}</h4>