Skip to content

Commit

Permalink
staking: add limit on number of validator funding streams
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Feb 7, 2024
1 parent 47a2264 commit 953f22d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ impl ActionHandler for validator::Definition {
anyhow::bail!("validator description must be less than 280 characters")
}

if self.validator.funding_streams.funding_streams.len() > 8 {
anyhow::bail!("validators can declare at most 8 funding streams")
}

// Then, we check the signature:
let definition_bytes = self.validator.encode_to_vec();
self.validator
Expand Down

0 comments on commit 953f22d

Please sign in to comment.