File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed 
actors/evm/src/interpreter/precompiles Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -141,15 +141,15 @@ pub(super) fn modexp<RT: Runtime>(
141141    Ok ( output) 
142142} 
143143
144- pub ( super )  fn  curve_to_vec ( curve :  G1 )  -> Result < Vec < u8 > ,   PrecompileError >  { 
144+ pub ( super )  fn  curve_to_vec ( curve :  G1 )  -> Vec < u8 >  { 
145145    AffineG1 :: from_jacobian ( curve) 
146146        . map ( |product| { 
147147            let  mut  output = vec ! [ 0 ;  64 ] ; 
148148            product. x ( ) . to_big_endian ( & mut  output[ 0 ..32 ] ) . unwrap ( ) ; 
149149            product. y ( ) . to_big_endian ( & mut  output[ 32 ..64 ] ) . unwrap ( ) ; 
150150            output
151151        } ) 
152-         . ok_or ( PrecompileError :: EcErr ( substrate_bn :: CurveError :: InvalidEncoding ) ) 
152+         . unwrap_or_default ( ) 
153153} 
154154
155155/// add 2 points together on an elliptic curve 
@@ -162,7 +162,7 @@ pub(super) fn ec_add<RT: Runtime>(
162162    let  point1:  G1  = input_params. read_value ( ) ?; 
163163    let  point2:  G1  = input_params. read_value ( ) ?; 
164164
165-     curve_to_vec ( point1 + point2) 
165+     Ok ( curve_to_vec ( point1 + point2) ) 
166166} 
167167
168168/// multiply a point on an elliptic curve by a scalar value 
@@ -175,7 +175,7 @@ pub(super) fn ec_mul<RT: Runtime>(
175175    let  point:  G1  = input_params. read_value ( ) ?; 
176176    let  scalar:  Fr  = input_params. read_value ( ) ?; 
177177
178-     curve_to_vec ( point *  scalar) 
178+     Ok ( curve_to_vec ( point *  scalar) ) 
179179} 
180180
181181/// pairs multple groups of twisted bn curves 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments