mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Re-enable no wallet functional tests
This commit is contained in:
parent
712fad0254
commit
adcc2d2ada
16 changed files with 46 additions and 1 deletions
|
|
@ -137,7 +137,6 @@ jobs:
|
||||||
DEP_OPTS="NO_WALLET=1 NO_QT=1"
|
DEP_OPTS="NO_WALLET=1 NO_QT=1"
|
||||||
GOAL="install"
|
GOAL="install"
|
||||||
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
|
BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
|
||||||
RUN_FUNCTIONAL_TESTS=false
|
|
||||||
# Cross-Mac
|
# Cross-Mac
|
||||||
- stage: test
|
- stage: test
|
||||||
env: >-
|
env: >-
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,9 @@ class AssetdirTests(BitcoinTestFramework):
|
||||||
self.num_nodes = 1
|
self.num_nodes = 1
|
||||||
[["-initialfreecoins=2100000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0"]]
|
[["-initialfreecoins=2100000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0"]]
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def setup_network(self, split=False):
|
def setup_network(self, split=False):
|
||||||
self.setup_nodes()
|
self.setup_nodes()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ class BlockSubsidyTest(BitcoinTestFramework):
|
||||||
# 10 satoshi block subsidy at start for one node, none for other
|
# 10 satoshi block subsidy at start for one node, none for other
|
||||||
self.extra_args = [["-con_blocksubsidy=10"], ["-con_blocksubsidy=0", "-txindex=1"]]
|
self.extra_args = [["-con_blocksubsidy=10"], ["-con_blocksubsidy=0", "-txindex=1"]]
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
|
|
||||||
# Block will have 10 satoshi output, node 1 will ban
|
# Block will have 10 satoshi output, node 1 will ban
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@ class BlockV4Test(BitcoinTestFramework):
|
||||||
self.extra_args = [['-whitelist=127.0.0.1', '-con_bip34height=0', '-con_bip65height=0', '-con_bip66height=0', '-con_csv_deploy_start=-1']]
|
self.extra_args = [['-whitelist=127.0.0.1', '-con_bip34height=0', '-con_bip65height=0', '-con_bip66height=0', '-con_csv_deploy_start=-1']]
|
||||||
self.setup_clean_chain = True
|
self.setup_clean_chain = True
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
|
|
||||||
# First, quick check that CSV is ACTIVE at genesis
|
# First, quick check that CSV is ACTIVE at genesis
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,10 @@ class BlockSignTest(BitcoinTestFramework):
|
||||||
As well as syncing blocks over p2p
|
As well as syncing blocks over p2p
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
# Dynamically generate N keys to be used for block signing.
|
# Dynamically generate N keys to be used for block signing.
|
||||||
def init_keys(self, num_keys):
|
def init_keys(self, num_keys):
|
||||||
self.keys = []
|
self.keys = []
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,9 @@ class CTTest (BitcoinTestFramework):
|
||||||
self.is_network_split = False
|
self.is_network_split = False
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
|
|
||||||
print("General Confidential tests")
|
print("General Confidential tests")
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ class ConnectGenesisTest(BitcoinTestFramework):
|
||||||
self.extra_args = [["-con_connect_coinbase=0", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN)],
|
self.extra_args = [["-con_connect_coinbase=0", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN)],
|
||||||
["-con_connect_coinbase=1", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN), '-anyonecanspendaremine=1']]
|
["-con_connect_coinbase=1", "-initialfreecoins={}".format(NUM_INITIAL_COINS * COIN), '-anyonecanspendaremine=1']]
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
# Same genesis block
|
# Same genesis block
|
||||||
assert_equal(self.nodes[0].getblockhash(0), self.nodes[1].getblockhash(0))
|
assert_equal(self.nodes[0].getblockhash(0), self.nodes[1].getblockhash(0))
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ class NamedDefaultAssetTest(BitcoinTestFramework):
|
||||||
self.is_network_split = False
|
self.is_network_split = False
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
#Claim all anyone-can-spend coins and test that calling sendtoaddress without providing the assetlabel parameter results in the specified default pegged asset being sent.
|
#Claim all anyone-can-spend coins and test that calling sendtoaddress without providing the assetlabel parameter results in the specified default pegged asset being sent.
|
||||||
self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 21000000, "", "", True)
|
self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 21000000, "", "", True)
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,9 @@ class FedPegTest(BitcoinTestFramework):
|
||||||
parser.add_argument("--parent_bitcoin", dest="parent_bitcoin", default=False, action="store_true",
|
parser.add_argument("--parent_bitcoin", dest="parent_bitcoin", default=False, action="store_true",
|
||||||
help="Parent nodes are Bitcoin")
|
help="Parent nodes are Bitcoin")
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def setup_network(self, split=False):
|
def setup_network(self, split=False):
|
||||||
if self.options.parent_bitcoin and self.options.parent_binpath == "":
|
if self.options.parent_bitcoin and self.options.parent_binpath == "":
|
||||||
raise Exception("Can't run with --parent_bitcoin without specifying --parent_binpath")
|
raise Exception("Can't run with --parent_bitcoin without specifying --parent_binpath")
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ class InitialReissuanceTokenTest(BitcoinTestFramework):
|
||||||
#Set number of initial reissuance tokens and also set initial free coins less than max so we can reissue more later
|
#Set number of initial reissuance tokens and also set initial free coins less than max so we can reissue more later
|
||||||
self.extra_args = [["-initialreissuancetokens=200000000", "-initialfreecoins=2000000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0", "-blindedaddresses=1"]]*2
|
self.extra_args = [["-initialreissuancetokens=200000000", "-initialfreecoins=2000000000000000", "-anyonecanspendaremine=1", "-con_connect_coinbase=1", "-con_blocksubsidy=0", "-blindedaddresses=1"]]*2
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def setup_network(self, split=False):
|
def setup_network(self, split=False):
|
||||||
self.setup_nodes()
|
self.setup_nodes()
|
||||||
connect_nodes_bi(self.nodes, 0, 1)
|
connect_nodes_bi(self.nodes, 0, 1)
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,9 @@ class IssuanceTest(BitcoinTestFramework):
|
||||||
self.extra_args = [["-blindedaddresses=1"]] * self.num_nodes
|
self.extra_args = [["-blindedaddresses=1"]] * self.num_nodes
|
||||||
self.setup_clean_chain = True
|
self.setup_clean_chain = True
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def setup_network(self, split=False):
|
def setup_network(self, split=False):
|
||||||
self.setup_nodes()
|
self.setup_nodes()
|
||||||
connect_nodes_bi(self.nodes, 0, 1)
|
connect_nodes_bi(self.nodes, 0, 1)
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,9 @@ class MandatoryCoinbaseTest(BitcoinTestFramework):
|
||||||
# Non-zero coinbase outputs *must* match this. Not setting it means anything is allowed
|
# Non-zero coinbase outputs *must* match this. Not setting it means anything is allowed
|
||||||
self.extra_args = [["-con_mandatorycoinbase="+mandatory_script], []]
|
self.extra_args = [["-con_mandatorycoinbase="+mandatory_script], []]
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
node0 = self.nodes[0]
|
node0 = self.nodes[0]
|
||||||
node1 = self.nodes[1]
|
node1 = self.nodes[1]
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,9 @@ class PAKTest (BitcoinTestFramework):
|
||||||
self.extra_args[i_pak1] = self.extra_args[i_pak1] + pak_to_option(pak1)
|
self.extra_args[i_pak1] = self.extra_args[i_pak1] + pak_to_option(pak1)
|
||||||
self.extra_args[i_pak2] = self.extra_args[i_pak2] + pak_to_option(pak2)
|
self.extra_args[i_pak2] = self.extra_args[i_pak2] + pak_to_option(pak2)
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
|
|
||||||
# Give novalidate 50 BTC
|
# Give novalidate 50 BTC
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ class ProgressTest(BitcoinTestFramework):
|
||||||
self.num_nodes = 2
|
self.num_nodes = 2
|
||||||
self.extra_args = [["-debug", "-con_npowtargetspacing=1", "-maxtimeadjustment=0"]] * self.num_nodes
|
self.extra_args = [["-debug", "-con_npowtargetspacing=1", "-maxtimeadjustment=0"]] * self.num_nodes
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def setup_network(self):
|
def setup_network(self):
|
||||||
self.setup_nodes()
|
self.setup_nodes()
|
||||||
self.is_network_split = True
|
self.is_network_split = True
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ class TxWitnessTest(BitcoinTestFramework):
|
||||||
self.setup_clean_chain = True
|
self.setup_clean_chain = True
|
||||||
self.num_nodes = 2
|
self.num_nodes = 2
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def assert_tx_format_also_signed(self, utxo, segwit):
|
def assert_tx_format_also_signed(self, utxo, segwit):
|
||||||
raw = self.nodes[0].createrawtransaction(
|
raw = self.nodes[0].createrawtransaction(
|
||||||
[{"txid": utxo["txid"], "vout": utxo["vout"]}],
|
[{"txid": utxo["txid"], "vout": utxo["vout"]}],
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@ class TweakFedpegTest(BitcoinTestFramework):
|
||||||
def setup_network(self):
|
def setup_network(self):
|
||||||
self.setup_nodes()
|
self.setup_nodes()
|
||||||
|
|
||||||
|
def skip_test_if_missing_module(self):
|
||||||
|
self.skip_if_no_wallet()
|
||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
# Test that OP_TRUE mainchain_addr/claim_script never changes
|
# Test that OP_TRUE mainchain_addr/claim_script never changes
|
||||||
assert_equal(self.nodes[0].getsidechaininfo()["fedpegscript"], OP_TRUE_SCRIPT)
|
assert_equal(self.nodes[0].getsidechaininfo()["fedpegscript"], OP_TRUE_SCRIPT)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue