blockchaininterface.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:joinmarket-clientserver 作者: JoinMarket-Org 项目源码 文件源码
def __init__(self, jsonRpc, network):
        super(BitcoinCoreInterface, self).__init__()
        self.jsonRpc = jsonRpc
        self.fast_sync_called = False
        blockchainInfo = self.jsonRpc.call("getblockchaininfo", [])
        actualNet = blockchainInfo['chain']

        netmap = {'main': 'mainnet', 'test': 'testnet', 'regtest': 'regtest'}
        if netmap[actualNet] != network:
            raise Exception('wrong network configured')

        self.txnotify_fun = []
        self.wallet_synced = False
        #task.LoopingCall objects that track transactions, keyed by txids.
        #Format: {"txid": (loop, unconfirmed true/false, confirmed true/false,
        #spent true/false), ..}
        self.tx_watcher_loops = {}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号