The address history `combineTransactionInfo` method removes the
outputIndex when creating the outputIndexes property. When these are
from the mempool the original reference is also modified.
We can easily solve this by returning new instances in `getOutputs`
and `getInputs` instead of a reference to the actual mempool instance.
This will also have the additional benefit that height and other
properties that will be the same for every mempool entry will
not be stored in memory longer than what is necessary to fulfill
a request.
There was a bug when getting unspent outputs that would include an output
that was spent in the mempool in addition to the new output with the change
address. This lead to a balance having an output counted twice towards the
end balance. The solution is to have the isSpent method for the address service
to also include if the output was spent in the mempool, as the isSpent
method exposed from bitcoind only includes if the output was spent in a block.
- To be able to query an inputTxId and inputIndex that spends an outputTxId and outputIndex
- Extends the mempoolSpentIndex to include the inputTxId and inputIndex
- There is a new signal called TxToMemPool
- This signal will connect to the bindings slot, queueTx
- When a tx is accepted into the memory pool, the tx will be queued and the tx_notifier will be scheduled
- The ProcessMessages signal was scheduling/connecting its slots slightly out of order for what we need
- First, the scan_messages needs to run and copy out the stream
- Second, Bitcoin's ProcessMessages needs to run in order to run AcceptToMemoryPool
- Third, scan_messages_after needs to run in order to signal our tx_monitor
- In order to make this happen, we need to pair ProcessMessages slot to the scan_messages slot and order that
- Then, AFTER those two complete, we can schedule scan_messages_after
- 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