-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: add block proposer to addresses_with_balance_change #203
feat: add block proposer to addresses_with_balance_change #203
Conversation
Hmm, actually not sure this is right -- I'm seeing Is there an easy way to get to the Update: I see |
you are right! we can only query balances given a namada address. I think you can fetch the proposal then call
Agree it would be better to store these in a separate table but not a big deal for now. |
Should this PR target |
yep! thanks |
cbf4f14
to
04d0f7f
Compare
This compiles, but doesn't quite seem to be working yet (I'm getting |
Ah, I think I've solved it -- turns out the RPC is case sensitive, and |
e8a1fa1
to
ecf924d
Compare
ecf924d
to
fb31083
Compare
let all_balance_changed_addresses = addresses | ||
.iter() | ||
.chain(block_proposer_address.iter()) | ||
.cloned() | ||
.collect::<HashSet<_>>(); |
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.
After rebasing to 1.0.0-maint
, this is going to have merge conflicts with main
-- though it should be relatively straightforward to resolve. I kept the pattern of combining HashSets
into all_balance_changed_addresses
here, in anticipation of merging to main
where it also has pgf_receipient_addresses
. One thing to watch out for is that here I used .iter().chain()
instead of .union()
which will make it simpler to combine the 3 HashSets
when this is merged to main
. So, when merging, you should keep this .iter().chain()
version and simply add the line
.chain(pgf_receipient_addresses.iter())
Per this comment on #199, block proposers also need balances fetched.
Figured this was an easy change -- @Fraccaman here's a PR implementing it, assuming this is the right fix here.