Skip to content

Commit

Permalink
This does not need to be concrete type (#24)
Browse files Browse the repository at this point in the history
kostekIV authored Jan 13, 2025

Verified

This commit was signed with the committer’s verified signature.
1 parent e953390 commit 49fefb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/redstone/src/verification.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{network::error::Error, SignerAddress, TimestampMillis};
use crate::{network::error::Error, TimestampMillis};

/// Verify if the update performed adheres to the logic:
/// If `price_write_timestamp` is None variant, update is always fine - it represent first write and it is always ok.
@@ -16,9 +16,9 @@ use crate::{network::error::Error, SignerAddress, TimestampMillis};
/// # Returns
///
/// Returns a `Result<(), Error>`, Ok in case it is fine to perform the update.
pub fn verify_update(
updater: &SignerAddress,
trusted_updaters: &[SignerAddress],
pub fn verify_update<T: PartialEq>(
updater: &T,
trusted_updaters: &[T],
price_write_timestamp: Option<TimestampMillis>,
time_now: TimestampMillis,
min_time_between_updates: TimestampMillis,

0 comments on commit 49fefb1

Please sign in to comment.