Skip to content

Commit 36f05f4

Browse files
chore: renamed function for test
1 parent 0fdbb3e commit 36f05f4

File tree

1 file changed

+5
-4
lines changed
  • target_chains/ethereum/sdk/stylus/contracts/src/pyth

1 file changed

+5
-4
lines changed

target_chains/ethereum/sdk/stylus/contracts/src/pyth/types.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl StoragePrice {
166166
}
167167

168168
/// This function is for just for testing
169-
pub fn from_price(price: Price) -> Self {
169+
pub fn test_from_price(price: Price) -> Self {
170170
let mut storage_price =
171171
unsafe { StoragePrice::new(U256::from(100), 0) };
172172
storage_price.set(price);
@@ -200,7 +200,8 @@ impl StoragePriceFeed {
200200
self.ema_price.set(price_feed.ema_price);
201201
}
202202

203-
pub fn from_price_feed(price_feed: PriceFeed) -> Self {
203+
/// This function is for just for testing
204+
pub fn test_from_price_feed(price_feed: PriceFeed) -> Self {
204205
let mut storage_price_feed =
205206
unsafe { StoragePriceFeed::new(U256::from(100), 0) };
206207
storage_price_feed.set(price_feed);
@@ -277,7 +278,7 @@ mod tests {
277278
expo: EXPO,
278279
publish_time: U256::from(1000),
279280
};
280-
let storage_price_result = StoragePrice::from_price(price_result);
281+
let storage_price_result = StoragePrice::test_from_price(price_result);
281282
let price_result = storage_price_result.to_price();
282283
assert_eq!(price_result.price, PRICE);
283284
assert_eq!(price_result.conf, CONF);
@@ -305,7 +306,7 @@ mod tests {
305306
ema_price: price_result_ema,
306307
};
307308
let storage_price_feed_result =
308-
StoragePriceFeed::from_price_feed(price_feed_result);
309+
StoragePriceFeed::test_from_price_feed(price_feed_result);
309310
let price_feed_result = storage_price_feed_result.to_price_feed();
310311
assert_eq!(price_feed_result.price.price, PRICE);
311312
assert_eq!(price_feed_result.price.conf, CONF);

0 commit comments

Comments
 (0)