#NEWLINE# def did_lock_to_index( self , block_tuple_list , start_index ) : #NEWLINE# #INDENT# with open ( os . path . join ( self . dir_path , self . BLOCK_HASHES_PATH ) , 'a+b' ) as f : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# with open ( os . path . join ( self . dir_path , self . BLOCK_HASHES_PATH ) , 'r+b' ) as f : #NEWLINE# #INDENT# f . seek ( ( start_index * 32 ) ) #NEWLINE# count = 0 #NEWLINE# for ( the_hash , parent_hash , weight ) in the_hash : #NEWLINE# #INDENT# f . write ( the_hash ) #NEWLINE# count += 1 #NEWLINE# #UNINDENT# logging . debug ( 'wrote %d items to block chain store at %s' , count , self . dir_path )