From 6f05bd7da0bd9c1a6ac432d26c97761dee868b09 Mon Sep 17 00:00:00 2001 From: Arionum Date: Thu, 22 Feb 2018 21:31:56 +0200 Subject: [PATCH] block change --- include/block.inc.php | 4 ++-- include/transaction.inc.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/block.inc.php b/include/block.inc.php index 3b96d26..47b8d51 100755 --- a/include/block.inc.php +++ b/include/block.inc.php @@ -16,8 +16,8 @@ public function add($height, $public_key, $nonce, $data, $date, $signature, $dif // create the hash / block id $hash=$this->hash($generator, $height, $date, $nonce, $data, $signature, $difficulty, $argon); - //fix for the broken base58 library used until block 17000, trimming the first 0 bytes. - if($height<=17000) $hash=ltrim($hash,'1'); + //fix for the broken base58 library used until block 16900, trimming the first 0 bytes. + if($height<16900) $hash=ltrim($hash,'1'); $json=json_encode($data); diff --git a/include/transaction.inc.php b/include/transaction.inc.php index 1622ee7..a3202c3 100755 --- a/include/transaction.inc.php +++ b/include/transaction.inc.php @@ -162,13 +162,13 @@ class Transaction { // no future transactions if($x['date']>time()+86400) { _log("$x[id] - Date in the future"); return false; } // prevent the resending of broken base58 transactions - if($height>16890&&$x['date']<1519323683) return false; + if($height>16000&&$x['date']<1519326876) return false; $id=$this->hash($x); // the hash does not match our regenerated hash if($x['id']!=$id) { - // fix for broken base58 library which was used until block 17000, accepts hashes without the first 1 or 2 bytes + // fix for broken base58 library which was used until block 16900, accepts hashes without the first 1 or 2 bytes $xs=base58_decode($x['id']); - if(((strlen($xs)!=63||substr($id,1)!=$x['id'])&&(strlen($xs)!=62||substr($id,2)!=$x['id']))||$height>17000){ + if(((strlen($xs)!=63||substr($id,1)!=$x['id'])&&(strlen($xs)!=62||substr($id,2)!=$x['id']))||$height>16900){ _log("$x[id] - $id - Invalid hash"); return false; }