From eb94f4bd22d2a0a7eae8667113cd33bdbb85534b Mon Sep 17 00:00:00 2001 From: Arionum Date: Sun, 28 Jan 2018 00:46:03 +0200 Subject: [PATCH] generate account --- api.php | 7 +++++-- sanity.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api.php b/api.php index 67ed9d6..91eab9e 100755 --- a/api.php +++ b/api.php @@ -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"){ diff --git a/sanity.php b/sanity.php index 1952727..e549e60 100755 --- a/sanity.php +++ b/sanity.php @@ -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");