merkleblock: minor. style.

This commit is contained in:
Christopher Jeffrey 2017-08-08 14:31:42 -07:00
parent 7de854ce3f
commit de9f37b290
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -522,7 +522,6 @@ MerkleBlock.fromBlock = function fromBlock(block, filter) {
MerkleBlock.fromHashes = function fromHashes(block, hashes) {
const filter = new Set();
const matches = [];
for (let hash of hashes) {
if (Buffer.isBuffer(hash))
@ -530,6 +529,8 @@ MerkleBlock.fromHashes = function fromHashes(block, hashes) {
filter.add(hash);
}
const matches = [];
for (const tx of block.txs) {
const hash = tx.hash('hex');
matches.push(filter.has(hash) ? 1 : 0);