From 9d517337363ff7641455b45228aed913516b8ed1 Mon Sep 17 00:00:00 2001 From: kr1z1s Date: Sun, 12 Jul 2020 10:54:01 +0300 Subject: [PATCH] Update helper.py merge with https://github.com/frstrtr/p2pool/commit/15220e1372c123e60c604a8f8fd80a03c23083cf fix for https://github.com/jtoomim/p2pool/issues/38 --- p2pool/bitcoin/helper.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/p2pool/bitcoin/helper.py b/p2pool/bitcoin/helper.py index 2fa13956..6255d1e5 100644 --- a/p2pool/bitcoin/helper.py +++ b/p2pool/bitcoin/helper.py @@ -24,7 +24,10 @@ def check(bitcoind, net, args): try: blockchaininfo = yield bitcoind.rpc_getblockchaininfo() - softforks_supported = set(item['id'] for item in blockchaininfo.get('softforks', [])) + try: + softforks_supported = set(item['id'] for item in blockchaininfo.get('softforks', [])) # not working with 0.19.0.1 + except TypeError: + softforks_supported = set(item for item in blockchaininfo.get('softforks', [])) # fix for https://github.com/jtoomim/p2pool/issues/38 try: softforks_supported |= set(item['id'] for item in blockchaininfo.get('bip9_softforks', [])) except TypeError: # https://github.com/bitcoin/bitcoin/pull/7863