File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2689,7 +2689,7 @@ pub struct DataRequestQueryParams {
26892689 dro_hash : Hash ,
26902690 rad_hash : Hash ,
26912691 rad_bytecode : String ,
2692- collateral_ratio : f32 ,
2692+ collateral_ratio : u16 ,
26932693 unitary_reward : u64 ,
26942694 witnesses : u16 ,
26952695}
@@ -2836,9 +2836,7 @@ async fn get_drt_query_params(dr_tx_hash: Hash) -> Result<DataRequestQueryParams
28362836 . unwrap_or_default ( ) ;
28372837
28382838 Ok ( DataRequestQueryParams {
2839- collateral_ratio : ( dr_tx. body . dr_output . collateral as f64 )
2840- . div ( dr_tx. body . dr_output . witness_reward as f64 )
2841- as f32 ,
2839+ collateral_ratio : dr_tx. body . dr_output . collateral . div_ceil ( dr_tx. body . dr_output . witness_reward ) as u16 ,
28422840 dro_hash : dr_tx. body . dr_output . hash ( ) ,
28432841 rad_hash : calculate_sha256 ( & bytecode) . into ( ) ,
28442842 rad_bytecode : hex:: encode ( & bytecode) ,
@@ -2865,9 +2863,7 @@ async fn get_drt_query_params(dr_tx_hash: Hash) -> Result<DataRequestQueryParams
28652863 . unwrap_or_default ( ) ;
28662864
28672865 Ok ( DataRequestQueryParams {
2868- collateral_ratio : ( dr_tx. body . dr_output . collateral as f64 )
2869- . div ( dr_tx. body . dr_output . witness_reward as f64 )
2870- as f32 ,
2866+ collateral_ratio : dr_tx. body . dr_output . collateral . div_ceil ( dr_tx. body . dr_output . witness_reward ) as u16 ,
28712867 dro_hash : dr_tx. body . dr_output . hash ( ) ,
28722868 rad_hash : calculate_sha256 ( & bytecode) . into ( ) ,
28732869 rad_bytecode : hex:: encode ( & bytecode) ,
You can’t perform that action at this time.
0 commit comments