|
|
@ -6,7 +6,6 @@ |
|
|
|
|
|
|
|
const bitcoin = require('bitcoinjs-lib') |
|
|
|
const Logger = require('../logger') |
|
|
|
const util = require('../util') |
|
|
|
const network = require('../bitcoin/network') |
|
|
|
const activeNet = network.network |
|
|
|
const keys = require('../../keys')[network.key] |
|
|
@ -40,7 +39,7 @@ class LocalIndexerWrapper extends Wrapper { |
|
|
|
_getScriptHash(address) { |
|
|
|
const bScriptPubKey = bitcoin.address.toOutputScript(address, activeNet) |
|
|
|
const bScriptHash = bitcoin.crypto.sha256(bScriptPubKey) |
|
|
|
return util.reverseBuffer(bScriptHash).toString('hex') |
|
|
|
return bScriptHash.reverse().toString('hex') |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|