-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove transactions from orphan pool. #167
Conversation
Another bonus with this fix, when the txs are removed from the orphan pool, orphans that are no longer orphans are moved to mempool and inv'd to peers. |
This logically reads well, but I want to manually test it before merging. |
While I know Go doesn't care about the function order, I'd prefer the unexported version comes before the exported version which depends on it. This is more consistent with the rest of the code. |
This change removes transactions from a newly connected block from the orphan pool if they exist. Additionally, any orphan transactions that are no longer orphan transactions are moved to the mempool and inv'd to the currently connected peers.
After reviewing this and thinking about it some more, I think a better approach to do this is to modify the I also noticed that, unlike normal transactions, orphans that now contain double spends due to newly connected transactions aren't currently removed either which this pull request doesn't address. |
I'm going to go ahead and merge this and open another issue to address the remaining cases. While this doesn't catch all of the cases, it is an improvement over the current code, works properly, and will allow the release to proceed. |
This has been rebased and merged as commit 4ad8622. |
…empt-to-prune-proofs-if-were-a-prune-node indexers: don't prune proofs if the node is pruned
This change removes transactions in a newly connected block
from the orphan pool if they exist. This helps keep memory
usage lower.