Skip to content

Commit

Permalink
fix bugs for utxo manager
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromtcosta committed Nov 30, 2022
1 parent 0e4f4b7 commit 9690008
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/neo4j/tipStatus/index.ts
Expand Up @@ -104,7 +104,8 @@ export const tipStatus = (driver: Driver) => ({
MATCH (b:Block)
WHERE b.hash IN $hashes
AND b.number = maxBlockNumber - $safeBlockDepth
WITH b, maxBlockNumber
WHERE b.number <= maxBlockNumber - $safeBlockDepth
RETURN {
hash: b.hash,
blockNumber: b.number
Expand Down
2 changes: 1 addition & 1 deletion src/neo4j/txs/utxoAtPoint.ts
Expand Up @@ -48,7 +48,7 @@ export const utxoAtPoint = (driver: Driver) => ({
OPTIONAL MATCH (o)-[:sourceOf]->(i:TX_IN)-[:inputOf]->(tx2:TX)-[:isAt]->(b2:Block)
WITH o, tx, b, i, tx2, b2 WHERE (i IS NULL) OR (b2.number >= 8002105)
WITH o, tx, b, i, tx2, b2 WHERE (i IS NULL) OR (b2.number >= $referenceBlockNumber)
RETURN {
utxo_id: o.id,
Expand Down

0 comments on commit 9690008

Please sign in to comment.