Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/blockstore.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2016 The Bitcoin Core developers | # Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""BlockStore and TxStore helper classes.""" | """BlockStore and TxStore helper classes.""" | ||||
from .mininode import * | |||||
from io import BytesIO | |||||
import dbm.dumb as dbmd | import dbm.dumb as dbmd | ||||
from io import BytesIO | |||||
import logging | |||||
from .messages import ( | |||||
CBlock, | |||||
CBlockHeader, | |||||
CBlockLocator, | |||||
msg_headers, | |||||
msg_generic, | |||||
) | |||||
logger = logging.getLogger("TestFramework.blockstore") | logger = logging.getLogger("TestFramework.blockstore") | ||||
class BlockStore(): | class BlockStore(): | ||||
"""BlockStore helper class. | """BlockStore helper class. | ||||
BlockStore keeps a map of blocks and implements helper functions for | BlockStore keeps a map of blocks and implements helper functions for | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |