mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-31 09:14:56 +00:00
[qa] blockstore: Switch to dumb dbm
Github-Pull: #8834 Rebased-From: fa9cd25ed0587078e3218965606c79ebf8138d53
This commit is contained in:
parent
83ad563ade
commit
1dd1783873
@ -9,11 +9,11 @@
|
|||||||
|
|
||||||
from .mininode import *
|
from .mininode import *
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import dbm.ndbm
|
import dbm.dumb as dbmd
|
||||||
|
|
||||||
class BlockStore(object):
|
class BlockStore(object):
|
||||||
def __init__(self, datadir):
|
def __init__(self, datadir):
|
||||||
self.blockDB = dbm.ndbm.open(datadir + "/blocks", 'c')
|
self.blockDB = dbmd.open(datadir + "/blocks", 'c')
|
||||||
self.currentBlock = 0
|
self.currentBlock = 0
|
||||||
self.headers_map = dict()
|
self.headers_map = dict()
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ class BlockStore(object):
|
|||||||
|
|
||||||
class TxStore(object):
|
class TxStore(object):
|
||||||
def __init__(self, datadir):
|
def __init__(self, datadir):
|
||||||
self.txDB = dbm.ndbm.open(datadir + "/transactions", 'c')
|
self.txDB = dbmd.open(datadir + "/transactions", 'c')
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.txDB.close()
|
self.txDB.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user