Navigation Menu

Skip to content

Commit

Permalink
transaction: remove unused mmap-related code
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Aug 31, 2015
1 parent cd83b93 commit aadbcca
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/transaction.py
Expand Up @@ -32,7 +32,6 @@
#
import struct
import StringIO
import mmap
import random

NO_SIGNATURE = 'ff'
Expand All @@ -55,16 +54,6 @@ def write(self, bytes): # Initialize with string of bytes
else:
self.input += bytes

def map_file(self, file, start): # Initialize with bytes from file
self.input = mmap.mmap(file.fileno(), 0, access=mmap.ACCESS_READ)
self.read_cursor = start

def seek_file(self, position):
self.read_cursor = position

def close_file(self):
self.input.close()

def read_string(self):
# Strings are encoded depending on length:
# 0 to 252 : 1-byte-length followed by bytes (if any)
Expand Down

0 comments on commit aadbcca

Please sign in to comment.