I've been looking through the code recently
The mempool is not in any way recorded (yep it's a memory pool
) so when you stop a bitcoind and restart it, it has nothing in mempool.
When a block comes in with transactions that should have been in the mempool (from before the restart) the debug.log doesn't clearly report how it resolved these missing transactions.
Anyone know exactly where in the code this is resolved?
The relevance is in respect to any transaction system that is looking for transactions.
In the case of normal transactions, (>0 confirm) I take it that code would normally have to backtrack to earlier blocks based on when the system went down and find the payments (but I'm not sure what happens to these missing txn's i.e. where in the debug.log explains it)
I'd guess the transactions simply just sneak into the system (i.e. the debug.log doesn't report them) but I'm not sure.
In the case of 0-confirms I take this to mean it isn't possible to backtrack until they reach 1 confirm.
Any explanations greatly appreciated
(and I'd guess that anyone who has written a BTC transaction system has already come across and dealt with/understands how to deal with these issues)