Skip to content

Commit

Permalink
Merge pull request #121 from pow-co/smart-contracts
Browse files Browse the repository at this point in the history
Correctly join proofs in sql when origin includes _vout
  • Loading branch information
owenkellogg authored Sep 15, 2023
2 parents d3b17e6 + 2d80761 commit e004d22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rankings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function rankSmartContractsByCumulativeDifficulty(contractType: string, st
const query = `
SELECT s.origin, SUM(p.difficulty) AS totalDifficulty
FROM "SmartContracts" AS s
INNER JOIN boost_job_proofs AS p ON p.content LIKE CONCAT(s.origin, '%')
INNER JOIN boost_job_proofs AS p ON p.content = SUBSTRING(s.origin FOR LENGTH(p.content))
AND s.class_name = :contractType
GROUP BY s.origin
Expand Down

0 comments on commit e004d22

Please sign in to comment.