Skip to content

Commit 7c7abd2

Browse files
author
Chris Kleeschulte
committed
isSpent logic
- Bitcoind's CCoinsViewMempool brings the mempool into view, but will not consider outputs therein as spent - Changed the test description to match what is happening in that view - Once a given tx has one confirmation, then isSpent will be true for those outputs
1 parent 05812b2 commit 7c7abd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

integration/regtest-node.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,8 @@ describe('Node Functionality', function() {
723723
result.should.equal(true);
724724
done();
725725
});
726-
it('will incorrectly return false for an input that is spent in an unconfirmed transaction', function(done) {
726+
//CCoinsViewMemPool only checks for spent outputs that are not the mempool
727+
it('will correctly return false for an input that is spent in an unconfirmed transaction', function(done) {
727728
node.services.address.getUnspentOutputs(address, false, function(err, results) {
728729
if (err) {
729730
throw err;

0 commit comments

Comments
 (0)