Browse Source

Several bugs

master
xcps 6 years ago committed by R4SAS
parent
commit
8418db9df9
  1. 6
      bin/syncBlockchain.js

6
bin/syncBlockchain.js

@ -105,7 +105,7 @@ async function saveTransaction(txid, blockHeight) {
// }); // });
// } // }
sync_sql += ` sync_sql += `
INSERT INTO Addresses (address) VALUES ("${address}"); INSERT IGNORE INTO Addresses (address) VALUES ("${address}");
SET @addrid = ( SET @addrid = (
SELECT IF( SELECT IF(
ROW_COUNT() > 0, ROW_COUNT() > 0,
@ -113,7 +113,7 @@ async function saveTransaction(txid, blockHeight) {
( (
SELECT id SELECT id
FROM Addresses FROM Addresses
WHERE address='Ga68WPtiA15sPyZzMXR9rUQZNz1AEpUaKW1' WHERE address='${address}'
) )
) )
); );
@ -153,7 +153,7 @@ async function saveTransaction(txid, blockHeight) {
// } // }
sync_sql += ` sync_sql += `
SET @vin = ( SET @vin = (
SELECT id SELECT Vouts.id
FROM Vouts FROM Vouts
INNER JOIN TransactionVouts INNER JOIN TransactionVouts
ON Vouts.id=TransactionVouts.VoutId ON Vouts.id=TransactionVouts.VoutId

Loading…
Cancel
Save