mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
Reward submitters only when submitted block is finalized (#34)
* reward submitters on finalization * fix grumble * make submitter part of ImportContext
This commit is contained in:
committed by
Bastian Köcher
parent
8232bdfe30
commit
d904a282c8
@@ -198,9 +198,9 @@ impl<'a> Validators<'a> {
|
||||
pub fn finalize_validators_change<S: Storage>(
|
||||
&self,
|
||||
storage: &mut S,
|
||||
finalized_blocks: &[(u64, H256)],
|
||||
finalized_blocks: &[(u64, H256, Option<S::Submitter>)],
|
||||
) -> Option<Vec<Address>> {
|
||||
for (_, finalized_hash) in finalized_blocks.iter().rev() {
|
||||
for (_, finalized_hash, _) in finalized_blocks.iter().rev() {
|
||||
if let Some(changes) = storage.scheduled_change(finalized_hash) {
|
||||
return Some(changes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user