diff --git a/contracts/core/price-aggregator/src/events.rs b/contracts/core/price-aggregator/src/events.rs index 14be0dc7c3..71bf623ab5 100644 --- a/contracts/core/price-aggregator/src/events.rs +++ b/contracts/core/price-aggregator/src/events.rs @@ -49,7 +49,7 @@ pub trait EventsModule { &self, #[indexed] from: &ManagedBuffer, #[indexed] to: &ManagedBuffer, - #[indexed] epoch: u64, + #[indexed] round: u64, ); #[event("add_submission")] @@ -57,6 +57,6 @@ pub trait EventsModule { &self, #[indexed] caller: &ManagedAddress, #[indexed] price: &BigUint, - #[indexed] epoch: u64, + #[indexed] round: u64, ); } diff --git a/contracts/core/price-aggregator/src/lib.rs b/contracts/core/price-aggregator/src/lib.rs index 6fba1bb1ef..0b665f7596 100644 --- a/contracts/core/price-aggregator/src/lib.rs +++ b/contracts/core/price-aggregator/src/lib.rs @@ -187,8 +187,8 @@ pub trait PriceAggregator: last_sub_time_mapper.set(current_timestamp); self.create_new_round(token_pair, submissions, decimals); - let epoch = self.blockchain().get_block_epoch(); - self.add_submission_event(&caller, &price, epoch); + let round = self.blockchain().get_block_round(); + self.add_submission_event(&caller, &price, round); } self.oracle_status() @@ -285,8 +285,8 @@ pub trait PriceAggregator: .push(&price_feed); self.emit_new_round_event(&token_pair, &price_feed); } else { - let epoch = self.blockchain().get_block_epoch(); - self.discard_round_event(&token_pair.from.clone(), &token_pair.to.clone(), epoch); + let round = self.blockchain().get_block_round(); + self.discard_round_event(&token_pair.from.clone(), &token_pair.to.clone(), round); } }