Skip to content

Commit

Permalink
Change Bitcoin to Dogecoin in qa/ files
Browse files Browse the repository at this point in the history
This changes all occurrences of `BITCOIN` to `DOGECOIN` and `bitcoind`
to `dogecoind` in all files in `qa/`. It does not change copyright
information.
  • Loading branch information
chromatic committed Apr 9, 2024
1 parent 497c602 commit 17830a0
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 60 deletions.
14 changes: 7 additions & 7 deletions qa/pull-tester/rpc-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
#If imported values are not defined then set to zero (or disabled)
if 'ENABLE_WALLET' not in vars():
ENABLE_WALLET=0
if 'ENABLE_BITCOIND' not in vars():
ENABLE_BITCOIND=0
if 'ENABLE_DOGECOIND' not in vars():
ENABLE_DOGECOIND=0
if 'ENABLE_UTILS' not in vars():
ENABLE_UTILS=0
if 'ENABLE_ZMQ' not in vars():
Expand Down Expand Up @@ -76,17 +76,17 @@
opts.add(arg)

#Set env vars
if "BITCOIND" not in os.environ:
os.environ["BITCOIND"] = BUILDDIR + '/src/bitcoind' + EXEEXT
if "DOGECOIND" not in os.environ:
os.environ["DOGECOIND"] = BUILDDIR + '/src/dogecoind' + EXEEXT

if EXEEXT == ".exe" and "-win" not in opts:
# https://github.com/bitcoin/bitcoin/commit/d52802551752140cf41f0d9a225a43e84404d3e9
# https://github.com/bitcoin/bitcoin/pull/5677#issuecomment-136646964
print("Win tests currently disabled by default. Use -win option to enable")
sys.exit(0)

if not (ENABLE_WALLET == 1 and ENABLE_UTILS == 1 and ENABLE_BITCOIND == 1):
print("No rpc tests to run. Wallet, utils, and bitcoind must all be enabled")
if not (ENABLE_WALLET == 1 and ENABLE_UTILS == 1 and ENABLE_DOGECOIND == 1):
print("No rpc tests to run. Wallet, utils, and dogecoind must all be enabled")
sys.exit(0)

# python3-zmq may not be installed. Handle this gracefully and with some helpful info
Expand Down Expand Up @@ -288,7 +288,7 @@ def __init__(self, num_tests_parallel, test_list=None, flags=None):
self.test_list = test_list
self.flags = flags
self.num_running = 0
# In case there is a graveyard of zombie bitcoinds, we can apply a
# In case there is a graveyard of zombie dogecoinds, we can apply a
# pseudorandom offset to hopefully jump over them.
# (625 is PORT_RANGE/MAX_NODES)
self.portseed_offset = int(time.time() * 1000) % 625
Expand Down
2 changes: 1 addition & 1 deletion qa/pull-tester/tests_config.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ EXEEXT="@EXEEXT@"
# These will turn into comments if they were disabled when configuring.
@ENABLE_WALLET_TRUE@ENABLE_WALLET=1
@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1
@BUILD_BITCOIND_TRUE@ENABLE_DOGECOIND=1
@ENABLE_ZMQ_TRUE@ENABLE_ZMQ=1
2 changes: 1 addition & 1 deletion qa/rpc-tests/bumpfee.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def setup_network(self, split=False):

# Encrypt wallet for test_locked_wallet_fails test
self.nodes[1].encryptwallet(WALLET_PASSPHRASE)
bitcoind_processes[1].wait()
dogecoind_processes[1].wait()
self.nodes[1] = start_node(1, self.options.tmpdir, extra_args[1])
self.nodes[1].walletpassphrase(WALLET_PASSPHRASE, WALLET_PASSPHRASE_TIMEOUT)

Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/httpbasics.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def run_test(self):
conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
out1 = conn.getresponse().read()
assert(b'"error":null' in out1)
assert(conn.sock!=None) #connection must be closed because bitcoind should use keep-alive by default
assert(conn.sock!=None) #connection must be closed because dogecoind should use keep-alive by default

# Check excessive request size
conn = http.client.HTTPConnection(urlNode2.hostname, urlNode2.port)
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/keypool.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def run_test(self):

# Encrypt wallet and wait to terminate
nodes[0].encryptwallet('test')
bitcoind_processes[0].wait()
dogecoind_processes[0].wait()
# Restart node 0
nodes[0] = start_node(0, self.options.tmpdir)
# Keep creating keys
Expand Down
12 changes: 6 additions & 6 deletions qa/rpc-tests/p2p-compactblocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Version 2 compact blocks are post-segwit (wtxids)
'''

# TestNode: A peer we use to send messages to bitcoind, and store responses.
# TestNode: A peer we use to send messages to dogecoind, and store responses.
class TestNode(SingleNodeConnCB):
def __init__(self):
SingleNodeConnCB.__init__(self)
Expand Down Expand Up @@ -266,7 +266,7 @@ def check_announcement_of_new_block(node, peer, predicate):
old_node.request_headers_and_sync(locator=[tip])
check_announcement_of_new_block(node, old_node, lambda p: p.last_cmpctblock is not None)

# This test actually causes bitcoind to (reasonably!) disconnect us, so do this last.
# This test actually causes dogecoind to (reasonably!) disconnect us, so do this last.
def test_invalid_cmpctblock_message(self):
self.nodes[0].generate(101)
block = self.build_block_on_tip(self.nodes[0])
Expand All @@ -281,7 +281,7 @@ def test_invalid_cmpctblock_message(self):
assert(int(self.nodes[0].getbestblockhash(), 16) == block.hashPrevBlock)

# Compare the generated shortids to what we expect based on BIP 152, given
# bitcoind's choice of nonce.
# dogecoind's choice of nonce.
def test_compactblock_construction(self, node, test_node, version, use_witness_address):
# Generate a bunch of transactions.
node.generate(101)
Expand Down Expand Up @@ -396,7 +396,7 @@ def check_compactblock_construction_from_block(self, version, header_and_shortid
header_and_shortids.shortids.pop(0)
index += 1

# Test that bitcoind requests compact blocks when we announce new blocks
# Test that dogecoind requests compact blocks when we announce new blocks
# via header or inv, and that responding to getblocktxn causes the block
# to be successfully reconstructed.
# Post-segwit: upgraded nodes would only make this request of cb-version-2,
Expand Down Expand Up @@ -580,7 +580,7 @@ def test_incorrect_blocktxn_response(self, node, test_node, version):
assert_equal(absolute_indexes, [6, 7, 8, 9, 10])

# Now give an incorrect response.
# Note that it's possible for bitcoind to be smart enough to know we're
# Note that it's possible for dogecoind to be smart enough to know we're
# lying, since it could check to see if the shortid matches what we're
# sending, and eg disconnect us for misbehavior. If that behavior
# change were made, we could just modify this test by having a
Expand Down Expand Up @@ -611,7 +611,7 @@ def test_incorrect_blocktxn_response(self, node, test_node, version):
assert_equal(int(node.getbestblockhash(), 16), block.sha256)

def test_getblocktxn_handler(self, node, test_node, version):
# bitcoind will not send blocktxn responses for blocks whose height is
# dogecoind will not send blocktxn responses for blocks whose height is
# more than 10 blocks deep.
MAX_GETBLOCKTXN_DEPTH = 10
chain_height = node.getblockcount()
Expand Down
4 changes: 2 additions & 2 deletions qa/rpc-tests/p2p-fullblocktest.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def update_block(block_number, new_transactions):
b26 = update_block(26, [])
yield rejected(RejectResult(16, b'bad-cb-length'))

# Extend the b26 chain to make sure bitcoind isn't accepting b26
# Extend the b26 chain to make sure dogecoind isn't accepting b26
b27 = block(27, spend=out[7])
yield rejected(RejectResult(0, b'bad-prevblk'))

Expand All @@ -409,7 +409,7 @@ def update_block(block_number, new_transactions):
b28 = update_block(28, [])
yield rejected(RejectResult(16, b'bad-cb-length'))

# Extend the b28 chain to make sure bitcoind isn't accepting b28
# Extend the b28 chain to make sure dogecoind isn't accepting b28
b29 = block(29, spend=out[7])
yield rejected(RejectResult(0, b'bad-prevblk'))

Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/p2p-leaktests.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self):
super().__init__()

# send a bunch of veracks without sending a message. This should get us disconnected.
# NOTE: implementation-specific check here. Remove if bitcoind ban behavior changes
# NOTE: implementation-specific check here. Remove if dogecoind ban behavior changes
def on_open(self, conn):
super().on_open(conn)
for i in range(banscore):
Expand Down
10 changes: 5 additions & 5 deletions qa/rpc-tests/p2p-segwit.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def test_unnecessary_witness_before_segwit_activation(self):
# rule).
self.test_node.test_witness_block(block, accepted=False)
# TODO: fix synchronization so we can test reject reason
# Right now, bitcoind delays sending reject messages for blocks
# Right now, dogecoind delays sending reject messages for blocks
# until the future, making synchronization here difficult.
#assert_equal(self.test_node.last_reject.reason, "unexpected-witness")

Expand Down Expand Up @@ -612,7 +612,7 @@ def test_submit_block(self):
self.nodes[0].submitblock(bytes_to_hex_str(block.serialize(True)))
assert(self.nodes[0].getbestblockhash() != block.hash)

# Now redo commitment with the standard nonce, but let bitcoind fill it in.
# Now redo commitment with the standard nonce, but let dogecoind fill it in.
add_witness_commitment(block, nonce=0)
block.vtx[0].wit = CTxWitness()
block.solve()
Expand Down Expand Up @@ -1527,7 +1527,7 @@ def test_p2sh_witness(self, segwit_activated):
# This transaction should not be accepted into the mempool pre- or
# post-segwit. Mempool acceptance will use SCRIPT_VERIFY_WITNESS which
# will require a witness to spend a witness program regardless of
# segwit activation. Note that older bitcoind's that are not
# segwit activation. Note that older dogecoind's that are not
# segwit-aware would also reject this for failing CLEANSTACK.
self.test_node.test_transaction_acceptance(spend_tx, with_witness=False, accepted=False)

Expand Down Expand Up @@ -1563,12 +1563,12 @@ def test_p2sh_witness(self, segwit_activated):
# Test the behavior of starting up a segwit-aware node after the softfork
# has activated. As segwit requires different block data than pre-segwit
# nodes would have stored, this requires special handling.
# To enable this test, pass --oldbinary=<path-to-pre-segwit-bitcoind> to
# To enable this test, pass --oldbinary=<path-to-pre-segwit-dogecoind> to
# the test.
def test_upgrade_after_activation(self, node, node_id):
print("\tTesting software upgrade after softfork activation")

assert(node_id != 0) # node0 is assumed to be a segwit-active bitcoind
assert(node_id != 0) # node0 is assumed to be a segwit-active dogecoind

# Make sure the nodes are all up
sync_blocks(self.nodes)
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/p2p-timeouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
""" TimeoutsTest -- test various net timeouts (only in extended tests)
- Create three bitcoind nodes:
- Create three dogecoind nodes:
no_verack_node - we never send a verack in response to their version
no_version_node - we never send a version (only a ping)
Expand Down
12 changes: 6 additions & 6 deletions qa/rpc-tests/proxy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
from test_framework.netutil import test_ipv6_local
'''
Test plan:
- Start bitcoind's with different proxy configurations
- Start dogecoind with different proxy configurations
- Use addnode to initiate connections
- Verify that proxies are connected to, and the right connection command is given
- Proxy configurations to test on bitcoind side:
- Proxy configurations to test on dogecoind side:
- `-proxy` (proxy everything)
- `-onion` (proxy just onions)
- `-proxyrandomize` Circuit randomization
Expand All @@ -30,8 +30,8 @@
- proxy on IPv6
- Create various proxies (as threads)
- Create bitcoinds that connect to them
- Manipulate the bitcoinds using addnode (onetry) an observe effects
- Create dogecoinds that connect to them
- Manipulate the dogecoinds using addnode (onetry) an observe effects
addnode connect to IPv4
addnode connect to IPv6
Expand Down Expand Up @@ -97,7 +97,7 @@ def node_test(self, node, proxies, auth, test_onion=True):
node.addnode("15.61.23.23:1234", "onetry")
cmd = proxies[0].queue.get()
assert(isinstance(cmd, Socks5Command))
# Note: bitcoind's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6
# Note: dogecoind's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6
assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, b"15.61.23.23")
assert_equal(cmd.port, 1234)
Expand All @@ -111,7 +111,7 @@ def node_test(self, node, proxies, auth, test_onion=True):
node.addnode("[1233:3432:2434:2343:3234:2345:6546:4534]:5443", "onetry")
cmd = proxies[1].queue.get()
assert(isinstance(cmd, Socks5Command))
# Note: bitcoind's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6
# Note: dogecoind's SOCKS5 implementation only sends atyp DOMAINNAME, even if connecting directly to IPv4/IPv6
assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, b"1233:3432:2434:2343:3234:2345:6546:4534")
assert_equal(cmd.port, 5443)
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/rpcbind_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def run_bind_test(self, allow_ips, connect_to, addresses, expected):
base_args += ['-rpcallowip=' + x for x in allow_ips]
binds = ['-rpcbind='+addr for addr in addresses]
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, [base_args + binds], connect_to)
pid = bitcoind_processes[0].pid
pid = dogecoind_processes[0].pid
assert_equal(set(get_bind_addrs(pid)), set(expected))
stop_nodes(self.nodes)

Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/test_framework/comptool.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .util import p2p_port

'''
This is a tool for comparing two or more bitcoinds to each other
This is a tool for comparing two or more dogecoinds to each other
using a script provided.
To use, create a class that implements get_tests(), and pass it in
Expand Down
6 changes: 3 additions & 3 deletions qa/rpc-tests/test_framework/mininode.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def FromHex(obj, hex_string):
def ToHex(obj):
return bytes_to_hex_str(obj.serialize())

# Objects that map to bitcoind objects, which can be serialized/deserialized
# Objects that map to dogecoind objects, which can be serialized/deserialized

class CAddress(object):
def __init__(self):
Expand Down Expand Up @@ -452,7 +452,7 @@ def deserialize(self, f):
if len(self.vin) == 0:
flags = struct.unpack("<B", f.read(1))[0]
# Not sure why flags can't be zero, but this
# matches the implementation in bitcoind
# matches the implementation in dogecoind
if (flags != 0):
self.vin = deser_vector(f, CTxIn)
self.vout = deser_vector(f, CTxOut)
Expand Down Expand Up @@ -1335,7 +1335,7 @@ def __init__(self):
self.headers = []

def deserialize(self, f):
# comment in bitcoind indicates these should be deserialized as blocks
# comment in dogecoind indicates these should be deserialized as blocks
blocks = deser_vector(f, CBlock)
for x in blocks:
self.headers.append(CBlockHeader(x))
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def main(self):
sys.exit(1)


# Test framework for doing p2p comparison testing, which sets up some bitcoind
# Test framework for doing p2p comparison testing, which sets up some dogecoind
# binaries:
# 1 binary: test binary
# 2 binaries: 1 test binary, 1 ref binary
Expand Down
Loading

0 comments on commit 17830a0

Please sign in to comment.