-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
recover senders manually if not found in db #4091
Conversation
9898da1
to
50b50b8
Compare
50b50b8
to
2390403
Compare
Codecov Report
... and 45 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
depending on the pruning configuration, there might be senders but not for all transactions. should account for that
both And in this particular case, they get queried for the same range. example: TxSenders: You only need to do And once this PR#4098 gets merged, you can even pass the range iterator to |
Ok I previously understood it in a wrong way because I thought that txs were ordered in the other sense: the old ones first. So in your example tx0 would be older then tx4. If that's not the case as I understand from your comment, I can do something like this to update // Recover senders manually if not found in db
let start_index = senders.len();
let end_index = transactions.len();
let missing_senders = end_index - start_index;
senders.extend((start_index..end_index).zip((0..missing_senders).map(|_| {
TransactionSigned::recover_signers(
transactions.iter().skip(start_index),
missing_senders,
)
}))); |
Oh I just saw that the PR you mentioned got reverted: #4115 Should I continue without using |
I worked without I just use |
Sorry, |
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
…alidator (paradigmxyz#4258) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
…z#4267) Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Sorry, closing this PR and re-opening a new one for this issue because I had some problems in my Vs code. Here is the new PR: #4280 |
Closes #3938
This is an initial draft for closing that issue.
I actually don't know if there is some other work to do in order to properly addressing that issue.
I just created a match statement in order to be able to recover
senders
also if they are not in the db anymore becauseSenderRecovery
pruned mode is enabled.