-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fixed transaction addresses mapping, fixes #1971 #2026
Conversation
Receipts must be updated as well |
Ideally, any info on transactions that are removed from canon chain and never added back should be deleted. But if it make is to complicated, I'm fine with them sticking around. |
BlockLocation::BranchBecomingCanonChain(ref data) => { | ||
let addresses = data.enacted.iter() | ||
.map(|hash| (hash, self.block_body(hash).unwrap())) | ||
.flat_map(|(hash, bytes)| { |
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.
should be an expect and the map
and flat_map
here can probably be unified.
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.
👍
Receipts are stored in hashmap, where the key is block hash (
It will make it slightly more complicated and I would prefer to do it in separate pr. The pr would be focus on removing all the unused data from db |
Right, I was assuming the key for receipts is tx hash |
changes: