bip152: minor.

This commit is contained in:
Christopher Jeffrey 2017-12-30 19:55:32 -08:00
parent d357ecb159
commit ec876215a6
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -14,7 +14,7 @@ const assert = require('assert');
const bio = require('bufio');
const consensus = require('../protocol/consensus');
const sha256 = require('bcrypto/lib/sha256');
const siphash256 = require('bcrypto/lib/siphash').siphash256;
const {siphash} = require('bcrypto/lib/siphash');
const AbstractBlock = require('../primitives/abstractblock');
const TX = require('../primitives/tx');
const Headers = require('../primitives/headers');
@ -369,7 +369,7 @@ class CompactBlock extends AbstractBlock {
if (typeof hash === 'string')
hash = Buffer.from(hash, 'hex');
const [hi, lo] = siphash256(hash, this.sipKey);
const [hi, lo] = siphash(hash, this.sipKey);
return (hi & 0xffff) * 0x100000000 + (lo >>> 0);
}