opentimestamps/opentimestamps-server

Unconfirmed txs clearing

RCasatta opened this issue · 3 comments

Is possible that the folllowing line:

self.unconfirmed_txs.clear()

Isn't considering the case where someone else is doing the transaction for the calendar but the digest is older than the most recent?
In that case we should probably remove only all the older than the current unconfirmed_tx (because the external tx is not conflicting with the calendar one)

Good point! I think you're right.

Maybe replace that with:

self.unconfirmed_txs = self.unconfirmed_txs[i+1:]

where i is the index of the unconfirmed tx found?

sure, doing the commit to fix in the current PR #24

Done, since I am looping self.unconfirmed_txs in reverse order I used [0:i]