mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
[qa] Use python2/3 syntax
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
# and for constructing a getheaders message
|
||||
#
|
||||
|
||||
from mininode import *
|
||||
from .mininode import *
|
||||
import dbm
|
||||
from io import BytesIO
|
||||
|
||||
class BlockStore(object):
|
||||
def __init__(self, datadir):
|
||||
@@ -21,7 +22,7 @@ class BlockStore(object):
|
||||
serialized_block = self.blockDB[repr(blockhash)]
|
||||
except KeyError:
|
||||
return None
|
||||
f = cStringIO.StringIO(serialized_block)
|
||||
f = BytesIO(serialized_block)
|
||||
ret = CBlock()
|
||||
ret.deserialize(f)
|
||||
ret.calc_sha256()
|
||||
@@ -115,7 +116,7 @@ class TxStore(object):
|
||||
serialized_tx = self.txDB[repr(txhash)]
|
||||
except KeyError:
|
||||
return None
|
||||
f = cStringIO.StringIO(serialized_tx)
|
||||
f = BytesIO(serialized_tx)
|
||||
ret = CTransaction()
|
||||
ret.deserialize(f)
|
||||
ret.calc_sha256()
|
||||
|
||||
Reference in New Issue
Block a user