Skip to content

Commit

Permalink
Fix bitpay#377; db must contain hash type, not just hash.
Browse files Browse the repository at this point in the history
Prevents erroneous crediting of all transactions to both the
p2pkh and the corresponding p2sh address.
  • Loading branch information
STRML committed Dec 18, 2015
1 parent 858182a commit 8f651f0
Show file tree
Hide file tree
Showing 3 changed files with 229 additions and 45 deletions.
5 changes: 3 additions & 2 deletions integration/regtest-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,9 @@ describe('Node Functionality', function() {
node.services.bitcoind.sendTransaction(tx.serialize());

setImmediate(function() {
var hashBuffer = bitcore.Address(address).hashBuffer;
node.services.address._getOutputsMempool(address, hashBuffer, function(err, outs) {
var addrObj = node.services.address._getAddressInfo(address);
node.services.address._getOutputsMempool(address, addrObj.hashBuffer,
addrObj.hashTypeBuffer, function(err, outs) {
if (err) {
throw err;
}
Expand Down
Loading

0 comments on commit 8f651f0

Please sign in to comment.