This repository was archived by the owner on Apr 6, 2020. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,11 @@ const rlp = ethUtil.rlp
1616// geth compatible db keys 
1717const  headHeaderKey  =  'LastHeader'  // current canonical head for light sync 
1818const  headBlockKey  =  'LastBlock'  // current canonical head for full sync 
19- const  headerPrefix  =  new   Buffer ( 'h' )  // headerPrefix + number + hash -> header 
20- const  tdSuffix  =  new   Buffer ( 't' )  // headerPrefix + number + hash + tdSuffix -> td 
21- const  numSuffix  =  new   Buffer ( 'n' )  // headerPrefix + number + numSuffix -> hash 
22- const  blockHashPrefix  =  new   Buffer ( 'H' )  // blockHashPrefix + hash -> number 
23- const  bodyPrefix  =  new   Buffer ( 'b' )  // bodyPrefix + number + hash -> block body 
19+ const  headerPrefix  =  Buffer . from ( 'h' )  // headerPrefix + number + hash -> header 
20+ const  tdSuffix  =  Buffer . from ( 't' )  // headerPrefix + number + hash + tdSuffix -> td 
21+ const  numSuffix  =  Buffer . from ( 'n' )  // headerPrefix + number + numSuffix -> hash 
22+ const  blockHashPrefix  =  Buffer . from ( 'H' )  // blockHashPrefix + hash -> number 
23+ const  bodyPrefix  =  Buffer . from ( 'b' )  // bodyPrefix + number + hash -> block body 
2424
2525// utility functions 
2626const  bufBE8  =  n  =>  n . toArrayLike ( Buffer ,  'be' ,  8 )  // convert BN to big endian Buffer 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments