Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 10 Functional Tests #184

Merged
merged 8 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/functional/rpc_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class NetTest(DigiByteTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2
self.extra_args = [["-minrelaytxfee=0.00001000"], ["-minrelaytxfee=0.00000500"]]
self.extra_args = [["-minrelaytxfee=0.00100000"], ["-minrelaytxfee=0.00050000"]]
self.supports_cli = False

def run_test(self):
Expand Down Expand Up @@ -95,8 +95,8 @@ def test_getpeerinfo(self):
# the address bound to on one side will be the source address for the other node
assert_equal(peer_info[0][0]['addrbind'], peer_info[1][0]['addr'])
assert_equal(peer_info[1][0]['addrbind'], peer_info[0][0]['addr'])
assert_equal(peer_info[0][0]['minfeefilter'], Decimal("0.00000500"))
assert_equal(peer_info[1][0]['minfeefilter'], Decimal("0.00001000"))
assert_equal(peer_info[0][0]['minfeefilter'], Decimal("0.00050500"))
assert_equal(peer_info[1][0]['minfeefilter'], Decimal("0.00100000"))
# check the `servicesnames` field
for info in peer_info:
assert_net_servicesnames(int(info[0]["services"], 0x10), info[0]["servicesnames"])
Expand Down Expand Up @@ -265,4 +265,4 @@ def test_addpeeraddress(self):


if __name__ == '__main__':
NetTest().main()
NetTest().main()
6 changes: 3 additions & 3 deletions test/functional/wallet_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test descriptor wallet function."""

from test_framework.blocktools import COINBASE_MATURITY
from test_framework.blocktools import COINBASE_MATURITY_2
from test_framework.test_framework import DigiByteTestFramework
from test_framework.util import (
assert_equal,
Expand Down Expand Up @@ -85,7 +85,7 @@ def run_test(self):
send_wrpc = self.nodes[0].get_wallet_rpc("desc1")

# Generate some coins
send_wrpc.generatetoaddress(COINBASE_MATURITY + 1, send_wrpc.getnewaddress())
send_wrpc.generatetoaddress(COINBASE_MATURITY_2 + 1, send_wrpc.getnewaddress())

# Make transactions
self.log.info("Test sending and receiving")
Expand Down Expand Up @@ -211,4 +211,4 @@ def run_test(self):
assert_equal(exp_addr, imp_addr)

if __name__ == '__main__':
WalletDescriptorTest().main ()
WalletDescriptorTest().main ()
4 changes: 2 additions & 2 deletions test/functional/wallet_fallbackfee.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.
"""Test wallet replace-by-fee capabilities in conjunction with the fallbackfee."""

from test_framework.blocktools import COINBASE_MATURITY
from test_framework.blocktools import COINBASE_MATURITY_2
from test_framework.test_framework import DigiByteTestFramework
from test_framework.util import assert_raises_rpc_error

Expand All @@ -17,7 +17,7 @@ def skip_test_if_missing_module(self):
self.skip_if_no_wallet()

def run_test(self):
self.generate(self.nodes[0], COINBASE_MATURITY + 1)
self.generate(self.nodes[0], COINBASE_MATURITY_2 + 1)

# sending a transaction without fee estimations must be possible by default on regtest
self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
Expand Down
8 changes: 4 additions & 4 deletions test/functional/wallet_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"""
from collections import defaultdict

from test_framework.blocktools import COINBASE_MATURITY
from test_framework.blocktools import COINBASE_MATURITY_2
from test_framework.test_framework import DigiByteTestFramework
from test_framework.util import assert_equal, assert_raises_rpc_error
from test_framework.wallet_util import test_address
Expand All @@ -33,7 +33,7 @@ def run_test(self):
# Note each time we call generate, all generated coins go into
# the same address, so we call twice to get two addresses w/50 each
self.generatetoaddress(node, nblocks=1, address=node.getnewaddress(label='coinbase'))
self.generatetoaddress(node, nblocks=COINBASE_MATURITY + 1, address=node.getnewaddress(label='coinbase'))
self.generatetoaddress(node, nblocks=COINBASE_MATURITY_2 + 1, address=node.getnewaddress(label='coinbase'))
assert_equal(node.getbalance(), 72000 * 2)

# there should be 2 address groups
Expand Down Expand Up @@ -105,7 +105,7 @@ def run_test(self):
label.verify(node)
assert_equal(node.getreceivedbylabel(label.name), 2)
label.verify(node)
self.generate(node, COINBASE_MATURITY + 1)
self.generate(node, COINBASE_MATURITY_2 + 1)

# Check that setlabel can assign a label to a new unused address.
for label in labels:
Expand All @@ -125,7 +125,7 @@ def run_test(self):
label.add_address(multisig_address)
label.purpose[multisig_address] = "send"
label.verify(node)
self.generate(node, COINBASE_MATURITY + 1)
self.generate(node, COINBASE_MATURITY_2 + 1)

# Check that setlabel can change the label of an address from a
# different label.
Expand Down
4 changes: 2 additions & 2 deletions test/functional/wallet_listsinceblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""Test the listsinceblock RPC."""

from test_framework.address import key_to_p2wpkh
from test_framework.blocktools import COINBASE_MATURITY
from test_framework.blocktools import COINBASE_MATURITY_2
from test_framework.key import ECKey
from test_framework.test_framework import DigiByteTestFramework
from test_framework.messages import BIP125_SEQUENCE_NUMBER
Expand All @@ -30,7 +30,7 @@ def run_test(self):
# All nodes are in IBD from genesis, so they'll need the miner (node2) to be an outbound connection, or have
# only one connection. (See fPreferredDownload in net_processing)
self.connect_nodes(1, 2)
self.generate(self.nodes[2], COINBASE_MATURITY + 1)
self.generate(self.nodes[2], COINBASE_MATURITY_2 + 1)

self.test_no_blockhash()
self.test_invalid_blockhash()
Expand Down
4 changes: 2 additions & 2 deletions test/functional/wallet_watchonly.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""Test createwallet watchonly arguments.
"""

from test_framework.blocktools import COINBASE_MATURITY
from test_framework.blocktools import COINBASE_MATURITY_2
from test_framework.test_framework import DigiByteTestFramework
from test_framework.util import (
assert_equal,
Expand Down Expand Up @@ -37,7 +37,7 @@ def run_test(self):
wo_wallet.importpubkey(pubkey=def_wallet.getaddressinfo(wo_change)['pubkey'])

# generate some btc for testing
self.generatetoaddress(node, COINBASE_MATURITY + 1, a1)
self.generatetoaddress(node, COINBASE_MATURITY_2 + 1, a1)

# send 1 btc to our watch-only address
txid = def_wallet.sendtoaddress(wo_addr, 1)
Expand Down