Skip to content

Commit

Permalink
Optimize mempool address index memory footprint
Browse files Browse the repository at this point in the history
- Adds default to store a large portion of the mempool index in leveldb
- Includes an option to use memdown to have the mempool index in-memory
  • Loading branch information
Braydon Fuller committed Oct 30, 2015
1 parent 086ba5f commit 89ef28f
Show file tree
Hide file tree
Showing 3 changed files with 667 additions and 225 deletions.
13 changes: 8 additions & 5 deletions integration/regtest-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,15 @@ describe('Node Functionality', function() {
node.services.bitcoind.sendTransaction(tx.serialize());

setImmediate(function() {
var length = node.services.address.mempoolOutputIndex[address].length;
length.should.equal(1);
should.exist(node.services.address.mempoolOutputIndex[address]);
done();
var hashBuffer = bitcore.Address(address).hashBuffer;
node.services.address._getOutputsMempool(address, hashBuffer, function(err, outs) {
if (err) {
throw err;
}
outs.length.should.equal(1);
done();
});
});

});

});
Expand Down
Loading

0 comments on commit 89ef28f

Please sign in to comment.