Skip to content
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

mempool: Remove returned error from ProcessOrphans #546

Merged
merged 1 commit into from
Nov 10, 2015
Merged

mempool: Remove returned error from ProcessOrphans #546

merged 1 commit into from
Nov 10, 2015

Conversation

dajohi
Copy link
Member

@dajohi dajohi commented Nov 10, 2015

ProcessTransaction could have accepted a new transaction into mempool
but could have returned a reject message if a no-longer-orphan
transaction failed to be accepted. This would also skip any
additional no-longer-orphans, keeping them in the orphan pool.

Instead of returning an error incorrectly, log the error and skip
the no-longer-orphan transaction. This allows the rest of the
no-longer-orphans to be processed as well.

Review on Reviewable

@davecgh
Copy link
Member

davecgh commented Nov 10, 2015

Commit message typos:

if an -> if a
would also skip the any -> would also skip any


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


mempool.go, line 1090 [r1] (raw file):
This defer is no longer needed since there is no longer a return. No sense in having the extra overhead.

mp.Lock()
mp.processOrphans(hash)
mp.Unlock()

Comments from the review on Reviewable.io

@dajohi
Copy link
Member Author

dajohi commented Nov 10, 2015

updated.

@davecgh
Copy link
Member

davecgh commented Nov 10, 2015

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

@davecgh
Copy link
Member

davecgh commented Nov 10, 2015

OK

@davecgh
Copy link
Member

davecgh commented Nov 10, 2015

@jrick and I were talking about this and the TODO in the case where the length of missing parents is non-zero, it should be put back into the orphan pool and continue thereby skipping the relay.

@davecgh
Copy link
Member

davecgh commented Nov 10, 2015

Reviewed 1 of 1 files at r3, 1 of 1 files at r4.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

@davecgh
Copy link
Member

davecgh commented Nov 10, 2015

Reviewed 1 of 1 files at r5.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

ProcessTransaction could have accepted a new transaction into mempool
but could have returned a reject message if a no-longer-orphan
transaction failed to be accepted.  This would also skip any
additional no-longer-orphans, keeping them in the orphan pool.

Instead of returning an error incorrectly, log the error and skip
the no-longer-orphan transaction.  This allows the rest of the
no-longer-orphans to be processed as well.
@davecgh
Copy link
Member

davecgh commented Nov 10, 2015

Reviewed 1 of 1 files at r6.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

@jrick
Copy link
Member

jrick commented Nov 10, 2015

ok

@davecgh
Copy link
Member

davecgh commented Nov 10, 2015

OK

@conformal-deploy conformal-deploy merged commit d765c73 into btcsuite:master Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants