Auto merge of #4398 - mdr0id:rpc_cross_platform_updates, r=str4d
Update RPCs to support cross platform testing This PR is used to add support for cross platform testing per host. Specifically, Windows RPCs. Notes from upstream on dbm.dumb : https://github.com/bitcoin/bitcoin/pull/8834/files
This commit is contained in:
commit
54af6cd781
|
@ -7,7 +7,7 @@ from .mininode import CBlock, CBlockHeader, CBlockLocator, CTransaction, msg_blo
|
|||
|
||||
import sys
|
||||
import io
|
||||
import dbm
|
||||
import dbm.dumb as dbm
|
||||
|
||||
class BlockStore():
|
||||
def __init__(self, datadir):
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
# Linux network utilities
|
||||
import sys
|
||||
import socket
|
||||
import fcntl
|
||||
import struct
|
||||
import array
|
||||
import os
|
||||
|
@ -88,6 +87,8 @@ def all_interfaces():
|
|||
'''
|
||||
Return all interfaces that are up
|
||||
'''
|
||||
import fcntl
|
||||
|
||||
is_64bits = sys.maxsize > 2**32
|
||||
struct_size = 40 if is_64bits else 32
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
|
|
|
@ -137,7 +137,7 @@ def initialize_chain(test_dir):
|
|||
shutil.rmtree("cache")
|
||||
|
||||
if not os.path.isdir(os.path.join("cache", "node0")):
|
||||
devnull = open("/dev/null", "w+")
|
||||
devnull = open(os.devnull, "w+")
|
||||
# Create cache directories, run bitcoinds:
|
||||
for i in range(4):
|
||||
datadir=initialize_datadir("cache", i)
|
||||
|
@ -240,7 +240,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
|
|||
])
|
||||
if extra_args is not None: args.extend(extra_args)
|
||||
bitcoind_processes[i] = subprocess.Popen(args)
|
||||
devnull = open("/dev/null", "w+")
|
||||
devnull = open(os.devnull, "w+")
|
||||
if os.getenv("PYTHON_DEBUG", ""):
|
||||
print("start_node: bitcoind started, calling bitcoin-cli -rpcwait getblockcount")
|
||||
subprocess.check_call([ os.getenv("BITCOINCLI", "bitcoin-cli"), "-datadir="+datadir] +
|
||||
|
|
Loading…
Reference in New Issue