Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 7x 7x 7x 13x 8x 8x 8x 7x 6x | const { Tx } = require('leap-core');
const { bufferToHex } = require('ethereumjs-util');
module.exports = async (db, tx) => {
if (tx.inputs && tx.inputs.length > 0 && tx.inputs[0].prevout) {
const prevTxHash = bufferToHex(tx.inputs[0].prevout.hash);
const txDoc = await db.getTransaction(prevTxHash);
if (txDoc) {
return Tx.fromJSON(txDoc.txData);
}
}
return null;
};
|