-
Notifications
You must be signed in to change notification settings - Fork 171
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
i1784 remove invalid tx from mempool and delivery tracker #1803
base: master
Are you sure you want to change the base?
i1784 remove invalid tx from mempool and delivery tracker #1803
Conversation
…lyFailedModification and invalidated in DeliveryTracker
…e' of github.com:ergoplatform/ergo into i1784-remove-invalid-tx-from-mempool-and-delivery-tracker
…er' of github.com:ergoplatform/ergo into i1784-remove-invalid-tx-from-mempool-and-delivery-tracker
…e' of github.com:ergoplatform/ergo into i1784-remove-invalid-tx-from-mempool-and-delivery-tracker
…er' of github.com:ergoplatform/ergo into i1784-remove-invalid-tx-from-mempool-and-delivery-tracker
…ove-invalid-tx-from-mempool-and-delivery-tracker
history.reportModifierIsInvalid(modToApply, progressInfo).map { case (newHis, newProgressInfo) => | ||
context.system.eventStream.publish(SemanticallyFailedModification(modToApply, e)) | ||
UpdateInformation(newHis, updateInfo.state, Some(modToApply), Some(newProgressInfo), updateInfo.suffix) | ||
case Failure(ex: MalformedModifierError) if ex.modifierTypeId == Transaction.ModifierTypeId => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how can transaction appear here at all?
Failed modifier should be a block I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works like this :
- in either way :
modToApply
is reported as invalid - if
MalformedModifierError
withTxType
is catched, we managed to find the invalid TX here https://github.com/ergoplatform/ergo/pull/1803/files#diff-85a518f9e45c7c4c4119bd8b54f22b95446a2c2c24b5b8328e1c6c4b7bbca4bdR93-R101 - otherwise we just report invalid
modToApply
I assume that even though block is considered invalid, we wanted to flag invalidate this particular TX in mempool, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not so simple, as history.reportModifierIsInvalid
is expecting block ,not transaction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We call reportModifierIsInvalid(modToApply)
in both cases, just in case of MalformedModifierError
with TxType
modifier we EliminateTransactions
so it gets removed from MemPool
Closes #1784