Skip to content

Commit

Permalink
reward the author of the first container block
Browse files Browse the repository at this point in the history
  • Loading branch information
librelois committed Oct 30, 2023
1 parent 3be9f61 commit c570d15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pallets/author-noting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ pub mod pallet {
let _ = core::mem::replace(old_block_info, block_info);
}
} else {
// If there is no previous block, we should reward the author of the first block
total_weight = total_weight.saturating_add(
T::AuthorNotingHook::on_container_author_noted(
&block_info.author,
block_info.block_number,
para_id,
),
);
let _ = core::mem::replace(
maybe_old_block_info,
Some(block_info),
Expand Down

0 comments on commit c570d15

Please sign in to comment.