generate account

This commit is contained in:
Arionum
2018-01-28 00:46:03 +02:00
parent 60c0d377c0
commit eb94f4bd22
2 changed files with 6 additions and 3 deletions

View File

@@ -90,8 +90,11 @@ elseif($q=="getPublicKey"){
}
api_Echo($res);
}
elseif($q=="currentBlock"){
} elseif($q=="generateAccount"){
$acc=new Account;
$res=$acc->generate_account();
api_echo($res);
} elseif($q=="currentBlock"){
$current=$block->current();
api_echo($current);
} elseif($q=="version"){

View File

@@ -30,7 +30,7 @@ if(php_sapi_name() !== 'cli') die("This should only be run as cli");
if(file_exists("tmp/sanity-lock")){
$pid_time=filemtime("tmp/sanity-lock");
if(time()-$pid_time>3600){
if(time()-$pid_time>86400){
@unlink("tmp/sanity-lock");
}
die("Sanity lock in place");