From 12986518a762ee5955cd7af877aa424e93cb962e Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Wed, 2 Mar 2016 05:03:10 +0100 Subject: [PATCH] backend: fix a wrong filter to detect unnotified blocks --- web/yaamp/core/backend/blocks.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/yaamp/core/backend/blocks.php b/web/yaamp/core/backend/blocks.php index 05fb52e..eca39a2 100644 --- a/web/yaamp/core/backend/blocks.php +++ b/web/yaamp/core/backend/blocks.php @@ -220,7 +220,9 @@ function BackendBlockFind2() $blockext = $remote->getblock($transaction['blockhash']); - $db_block = getdbosql('db_blocks', "blockhash='{$transaction['blockhash']}' OR height={$blockext['height']}"); + $db_block = getdbosql('db_blocks', "coin_id=:id AND (blockhash=:hash OR height=:height)", + array(':id'=>$coin->id, ':hash'=>$transaction['blockhash'], ':height'=>$blockext['height']) + ); if($db_block) continue; if ($coin->symbol == 'DCR')