Skip to content

Commit

Permalink
Update test/functional
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-emma committed Mar 9, 2024
1 parent 8ad3129 commit c894101
Show file tree
Hide file tree
Showing 18 changed files with 121 additions and 136 deletions.
84 changes: 27 additions & 57 deletions test/functional/data/rpc_psbt.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions test/functional/feature_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,14 @@ def node_test(self, node, *, proxies, auth, test_onion, test_cjdns):

if test_onion:
addr = "BGLostk4e4re.onion:8333"
addr = "35k2va6vyw4oo5ly2quvcszgdqr56kcnfgcqpnpcffut4jn3mhhwgbid.onion:18333"
self.log.debug("Test: outgoing onion connection through node for address {}".format(addr))
node.addnode(addr, "onetry")
cmd = proxies[2].queue.get()
assert isinstance(cmd, Socks5Command)
assert_equal(cmd.atyp, AddressType.DOMAINNAME)
assert_equal(cmd.addr, b"BGLostk4e4re.onion")
assert_equal(cmd.port, 8333)
assert_equal(cmd.addr, b"35k2va6vyw4oo5ly2quvcszgdqr56kcnfgcqpnpcffut4jn3mhhwgbid.onion")
assert_equal(cmd.port, 18333)
if not auth:
assert_equal(cmd.username, None)
assert_equal(cmd.password, None)
Expand Down
5 changes: 4 additions & 1 deletion test/functional/feature_segwit.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
try_rpc,
)

from test_framework.wallet_util import (
get_generate_key,
)
NODE_0 = 0
NODE_2 = 2
P2WPKH = 0
Expand Down Expand Up @@ -125,7 +128,7 @@ def run_test(self):
self.log.info("Verify sigops are counted in GBT with pre-BIP141 rules before the fork")
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
tmpl = self.nodes[0].getblocktemplate({'rules': ['segwit']})
assert_equal(tmpl['sizelimit'], 1000000)
assert_equal(tmpl['sizelimit'], 100000)
assert 'weightlimit' not in tmpl
assert_equal(tmpl['sigoplimit'], 20000)
assert_equal(tmpl['transactions'][0]['hash'], txid)
Expand Down
4 changes: 2 additions & 2 deletions test/functional/interface_BGL_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

# The block reward of coinbaseoutput.nValue (200) BGL/block matures after
# COINBASE_MATURITY (100) blocks. Therefore, after mining 101 blocks we expect
# node 0 to have a balance of (BLOCKS - COINBASE_MATURITY) * 50 BTC/block.
# node 0 to have a balance of (BLOCKS - COINBASE_MATURITY) * 200 BLG/block.
BLOCKS = COINBASE_MATURITY + 1
BALANCE = (BLOCKS - 100) * 50
BALANCE = (BLOCKS - 100) * 200

JSON_PARSING_ERROR = 'error: Error parsing JSON: foo'
BLOCKS_VALUE_OF_ZERO = 'error: the first argument (number of blocks to generate, default: 1) must be an integer value greater than zero'
Expand Down
15 changes: 8 additions & 7 deletions test/functional/mempool_spend_coinbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def set_test_params(self):

def run_test(self):
wallet = MiniWallet(self.nodes[0])
self.generate(wallet, 200)

# Invalidate two blocks, so that miniwallet has access to a coin that will mature in the next block
chain_height = 198
Expand All @@ -37,24 +38,24 @@ def run_test(self):
utxo_mature = wallet.get_utxo(txid=coinbase_txid(chain_height - 100 + 1))
utxo_immature = wallet.get_utxo(txid=coinbase_txid(chain_height - 100 + 2))

spend_101_id = wallet.send_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_101)["txid"]
spend_mature_id = wallet.send_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_mature)["txid"]

# other coinbase should be too immature to spend
immature_tx = wallet.create_self_transfer(utxo_to_spend=utxo_immature)
assert_raises_rpc_error(-26,
"bad-txns-premature-spend-of-coinbase",
lambda: wallet.send_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_102))
lambda: self.nodes[0].sendrawtransaction(immature_tx['hex']))

# mempool should have just spend_101:
assert_equal(self.nodes[0].getrawmempool(), [spend_101_id])
# mempool should have just the mature one
assert_equal(self.nodes[0].getrawmempool(), [spend_mature_id])

# mine a block, mature one should get confirmed
self.generate(self.nodes[0], 1)
assert_equal(set(self.nodes[0].getrawmempool()), set())

# ... and now height 102 can be spent:
spend_102_id = wallet.send_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_102)["txid"]
assert_equal(self.nodes[0].getrawmempool(), [spend_102_id])
# ... and now previously immature can be spent:
spend_new_id = self.nodes[0].sendrawtransaction(immature_tx['hex'])
assert_equal(self.nodes[0].getrawmempool(), [spend_new_id])


if __name__ == '__main__':
Expand Down
3 changes: 1 addition & 2 deletions test/functional/mempool_updatefromblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ def transaction_graph_test(self, size, n_tx_to_mine=None, fee=100_000):
assert_equal(entry['ancestorsize'], sum(tx_size[0:(k + 1)]))

def run_test(self):
# Use batch size limited by DEFAULT_ANCESTOR_LIMIT = 25 to not fire "too many unconfirmed parents" error.
self.transaction_graph_test(size=100, n_tx_to_mine=[25, 50, 75])
self.transaction_graph_test(size=90, n_tx_to_mine=[15, 30, 45, 60, 75])


if __name__ == '__main__':
Expand Down
12 changes: 12 additions & 0 deletions test/functional/mining_prioritisetransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ def set_test_params(self):
]] * self.num_nodes
self.supports_cli = False

def clear_prioritisation(self, node):
for txid, info in node.getprioritisedtransactions().items():
delta = info["fee_delta"]
node.prioritisetransaction(txid, 0, -delta)
assert_equal(node.getprioritisedtransactions(), {})

def test_replacement(self):
self.log.info("Test tx prioritisation stays after a tx is replaced")
conflicting_input = self.wallet.get_utxo()
Expand Down Expand Up @@ -263,6 +269,12 @@ def run_test(self):
if (x != high_fee_tx):
assert x not in mempool


self.log.info("Assert that 0 delta is never added to mapDeltas")
tx_id_zero_del = self.wallet.create_self_transfer()['txid']
self.nodes[0].prioritisetransaction(txid=tx_id_zero_del, fee_delta=0)
assert tx_id_zero_del not in self.nodes[0].getprioritisedtransactions()

# Create a free transaction. Should be rejected.
tx_res = self.wallet.create_self_transfer(fee_rate=0)
tx_hex = tx_res['hex']
Expand Down
2 changes: 1 addition & 1 deletion test/functional/rpc_decodescript.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def decodescript_miniscript(self):
assert res["segwit"]["desc"] == "wsh(and_v(and_v(v:hash160(ffffffffffffffffffffffffffffffffffffffff),v:pk(0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0)),older(1)))#gm8xz4fl"
# Miniscript-incompatible offered HTLC
res = self.nodes[0].decodescript("82012088a914ffffffffffffffffffffffffffffffffffffffff882102ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffacb2")
assert res["segwit"]["desc"] == "addr(bcrt1q73qyfypp47hvgnkjqnav0j3k2lq3v76wg22dk8tmwuz5sfgv66xsvxg6uu)#9p3q328s"
assert res["segwit"]["desc"] == "addr(rbgl1q73qyfypp47hvgnkjqnav0j3k2lq3v76wg22dk8tmwuz5sfgv66xs30aw69)#3au236he"
# Miniscript-compatible multisig bigger than 520 byte P2SH limit.
res = self.nodes[0].decodescript("5b21020e0338c96a8870479f2396c373cc7696ba124e8635d41b0ea581112b678172612102675333a4e4b8fb51d9d4e22fa5a8eaced3fdac8a8cbf9be8c030f75712e6af992102896807d54bc55c24981f24a453c60ad3e8993d693732288068a23df3d9f50d4821029e51a5ef5db3137051de8323b001749932f2ff0d34c82e96a2c2461de96ae56c2102a4e1a9638d46923272c266631d94d36bdb03a64ee0e14c7518e49d2f29bc401021031c41fdbcebe17bec8d49816e00ca1b5ac34766b91c9f2ac37d39c63e5e008afb2103079e252e85abffd3c401a69b087e590a9b86f33f574f08129ccbd3521ecf516b2103111cf405b627e22135b3b3733a4a34aa5723fb0f58379a16d32861bf576b0ec2210318f331b3e5d38156da6633b31929c5b220349859cc9ca3d33fb4e68aa08401742103230dae6b4ac93480aeab26d000841298e3b8f6157028e47b0897c1e025165de121035abff4281ff00660f99ab27bb53e6b33689c2cd8dcd364bc3c90ca5aea0d71a62103bd45cddfacf2083b14310ae4a84e25de61e451637346325222747b157446614c2103cc297026b06c71cbfa52089149157b5ff23de027ac5ab781800a578192d175462103d3bde5d63bdb3a6379b461be64dad45eabff42f758543a9645afd42f6d4248282103ed1e8d5109c9ed66f7941bc53cc71137baa76d50d274bda8d5e8ffbd6e61fe9a5fae736402c00fb269522103aab896d53a8e7d6433137bbba940f9c521e085dd07e60994579b64a6d992cf79210291b7d0b1b692f8f524516ed950872e5da10fb1b808b5a526dedc6fed1cf29807210386aa9372fbab374593466bc5451dc59954e90787f08060964d95c87ef34ca5bb53ae68")
assert_equal(res["segwit"]["desc"], "wsh(or_d(multi(11,020e0338c96a8870479f2396c373cc7696ba124e8635d41b0ea581112b67817261,02675333a4e4b8fb51d9d4e22fa5a8eaced3fdac8a8cbf9be8c030f75712e6af99,02896807d54bc55c24981f24a453c60ad3e8993d693732288068a23df3d9f50d48,029e51a5ef5db3137051de8323b001749932f2ff0d34c82e96a2c2461de96ae56c,02a4e1a9638d46923272c266631d94d36bdb03a64ee0e14c7518e49d2f29bc4010,031c41fdbcebe17bec8d49816e00ca1b5ac34766b91c9f2ac37d39c63e5e008afb,03079e252e85abffd3c401a69b087e590a9b86f33f574f08129ccbd3521ecf516b,03111cf405b627e22135b3b3733a4a34aa5723fb0f58379a16d32861bf576b0ec2,0318f331b3e5d38156da6633b31929c5b220349859cc9ca3d33fb4e68aa0840174,03230dae6b4ac93480aeab26d000841298e3b8f6157028e47b0897c1e025165de1,035abff4281ff00660f99ab27bb53e6b33689c2cd8dcd364bc3c90ca5aea0d71a6,03bd45cddfacf2083b14310ae4a84e25de61e451637346325222747b157446614c,03cc297026b06c71cbfa52089149157b5ff23de027ac5ab781800a578192d17546,03d3bde5d63bdb3a6379b461be64dad45eabff42f758543a9645afd42f6d424828,03ed1e8d5109c9ed66f7941bc53cc71137baa76d50d274bda8d5e8ffbd6e61fe9a),and_v(v:older(4032),multi(2,03aab896d53a8e7d6433137bbba940f9c521e085dd07e60994579b64a6d992cf79,0291b7d0b1b692f8f524516ed950872e5da10fb1b808b5a526dedc6fed1cf29807,0386aa9372fbab374593466bc5451dc59954e90787f08060964d95c87ef34ca5bb))))#7jwwklk4")
Expand Down
30 changes: 15 additions & 15 deletions test/functional/rpc_scantxoutset.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ def run_test(self):
self.sendtodestination(spk_BECH32, 0.004)

#send to child keys of tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK
self.sendtodestination("mkHV1C6JLheLoUSSZYk7x3FH5tnx9bu7yc", 0.008) # (m/0'/0'/0')
self.sendtodestination("mipUSRmJAj2KrjSvsPQtnP8ynUon7FhpCR", 0.016) # (m/0'/0'/1')
self.sendtodestination("n37dAGe6Mq1HGM9t4b6rFEEsDGq7Fcgfqg", 0.032) # (m/0'/0'/1500')
self.sendtodestination("mqS9Rpg8nNLAzxFExsgFLCnzHBsoQ3PRM6", 0.064) # (m/0'/0'/0)
self.sendtodestination("mnTg5gVWr3rbhHaKjJv7EEEc76ZqHgSj4S", 0.128) # (m/0'/0'/1)
self.sendtodestination("mketCd6B9U9Uee1iCsppDJJBHfvi6U6ukC", 0.256) # (m/0'/0'/1500)
self.sendtodestination("mj8zFzrbBcdaWXowCQ1oPZ4qioBVzLzAp7", 0.512) # (m/1/1/0')
self.sendtodestination("mfnKpKQEftniaoE1iXuMMePQU3PUpcNisA", 1.024) # (m/1/1/1')
self.sendtodestination("mou6cB1kaP1nNJM1sryW6YRwnd4shTbXYQ", 2.048) # (m/1/1/1500')
self.sendtodestination("mtfUoUax9L4tzXARpw1oTGxWyoogp52KhJ", 4.096) # (m/1/1/0)
self.sendtodestination("mxp7w7j8S1Aq6L8StS2PqVvtt4HGxXEvdy", 8.192) # (m/1/1/1)
self.sendtodestination("mpQ8rokAhp1TAtJQR6F6TaUmjAWkAWYYBq", 16.384) # (m/1/1/1500)
self.sendtodestination("rbgl1qx3x8pd2j82774x9v5jtrt67v6eq0xg33h9wtfn", 0.008) # (m/0'/0'/0')
self.sendtodestination("rbgl1qysufe22kf66mz3jtq33f0d88arruws4ye5egv0", 0.016) # (m/0'/0'/1')
self.sendtodestination("rbgl1qan5n5jj47futj90060396taeegswnhusutx05j", 0.032) # (m/0'/0'/1500')
self.sendtodestination("rbgl1qdny83c9q5x3glq86aa68gevelzqwwu9qhdhxqa", 0.064) # (m/0'/0'/0)
self.sendtodestination("rbgl1qfs4pjvfdkscn82qraqvvwahw0fyd20ykgp4hjd", 0.128) # (m/0'/0'/1)
self.sendtodestination("rbgl1q8pvg59ekgx6lryuysvqf4ljtgyjr8nsl3kl00s", 0.256) # (m/0'/0'/1500)
self.sendtodestination("rbgl1qy7u0mmtl4qz4833p8f43v63m7nqmscls6jgxc8", 0.512) # (m/1/1/0')
self.sendtodestination("rbgl1qqt5rga2600fjzhlvh89p8qy7nyrp9e6807hwha", 1.024) # (m/1/1/1')
self.sendtodestination("rbgl1qt0c33ft6cfw852p6chqvqpkwxvmfl8vnzy02zv", 2.048) # (m/1/1/1500')
self.sendtodestination("rbgl1qjqmxmkpmxt80xz4y3746zgt0q3u3ferrg2ss57", 4.096) # (m/1/1/0)
self.sendtodestination("rbgl1qhku5rq7jz8ulufe2y6fkcpnlvpsta7rqv2cz5w", 8.192) # (m/1/1/1)
self.sendtodestination("rbgl1qv9hs5rhkgcx0ef6f9g26k3k83hmhugjtart6dr", 16.384) # (m/1/1/1500)

self.generate(self.nodes[0], 1)

Expand Down Expand Up @@ -112,9 +112,9 @@ def run_test(self):
assert_equal(self.nodes[0].scantxoutset("start", [{"desc": "combo(tpubD6NzVbkrYhZ4WaWSyoBvQwbpLkojyoTZPRsgXELWz3Popb3qkjcJyJUGLnL4qHHoQvao8ESaAstxYSnhyswJ76uZPStJRJCTKvosUCJZL5B/1/1/*)", "range": [1500, 1500]}])['total_amount'], Decimal("16.384"))

# Test the reported descriptors for a few matches
assert_equal(descriptors(self.nodes[0].scantxoutset("start", [{"desc": "combo(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/0h/0h/*)", "range": 1499}])), ["pkh([0c5f9a1e/0h/0h/0]026dbd8b2315f296d36e6b6920b1579ca75569464875c7ebe869b536a7d9503c8c)#rthll0rg", "pkh([0c5f9a1e/0h/0h/1]033e6f25d76c00bedb3a8993c7d5739ee806397f0529b1b31dda31ef890f19a60c)#mcjajulr"])
assert_equal(descriptors(self.nodes[0].scantxoutset("start", ["combo(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/0)"])), ["pkh([0c5f9a1e/1/1/0]03e1c5b6e650966971d7e71ef2674f80222752740fc1dfd63bbbd220d2da9bd0fb)#cxmct4w8"])
assert_equal(descriptors(self.nodes[0].scantxoutset("start", [{"desc": "combo(tpubD6NzVbkrYhZ4WaWSyoBvQwbpLkojyoTZPRsgXELWz3Popb3qkjcJyJUGLnL4qHHoQvao8ESaAstxYSnhyswJ76uZPStJRJCTKvosUCJZL5B/1/1/*)", "range": 1500}])), ['pkh([0c5f9a1e/1/1/0]03e1c5b6e650966971d7e71ef2674f80222752740fc1dfd63bbbd220d2da9bd0fb)#cxmct4w8', 'pkh([0c5f9a1e/1/1/1500]03832901c250025da2aebae2bfb38d5c703a57ab66ad477f9c578bfbcd78abca6f)#vchwd07g', 'pkh([0c5f9a1e/1/1/1]030d820fc9e8211c4169be8530efbc632775d8286167afd178caaf1089b77daba7)#z2t3ypsa'])
assert_equal(descriptors(self.nodes[0].scantxoutset("start", [{"desc": "combo(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/0h/0h/*)", "range": 1499}])), ['wpkh([0c5f9a1e/0h/0h/0]026dbd8b2315f296d36e6b6920b1579ca75569464875c7ebe869b536a7d9503c8c)#7749nfmx', 'wpkh([0c5f9a1e/0h/0h/1]033e6f25d76c00bedb3a8993c7d5739ee806397f0529b1b31dda31ef890f19a60c)#9rz6d7gh'])
assert_equal(descriptors(self.nodes[0].scantxoutset("start", ["combo(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/0)"])), ['wpkh([0c5f9a1e/1/1/0]03e1c5b6e650966971d7e71ef2674f80222752740fc1dfd63bbbd220d2da9bd0fb)#87kxggfx'])
assert_equal(descriptors(self.nodes[0].scantxoutset("start", [{"desc": "combo(tpubD6NzVbkrYhZ4WaWSyoBvQwbpLkojyoTZPRsgXELWz3Popb3qkjcJyJUGLnL4qHHoQvao8ESaAstxYSnhyswJ76uZPStJRJCTKvosUCJZL5B/1/1/*)", "range": 1500}])), ['wpkh([0c5f9a1e/1/1/0]03e1c5b6e650966971d7e71ef2674f80222752740fc1dfd63bbbd220d2da9bd0fb)#87kxggfx', 'wpkh([0c5f9a1e/1/1/1500]03832901c250025da2aebae2bfb38d5c703a57ab66ad477f9c578bfbcd78abca6f)#52n9r9yl', 'wpkh([0c5f9a1e/1/1/1]030d820fc9e8211c4169be8530efbc632775d8286167afd178caaf1089b77daba7)#5qr0rhvk'])

# Check that status and abort don't need second arg
assert_equal(self.nodes[0].scantxoutset("status"), None)
Expand Down
4 changes: 2 additions & 2 deletions test/functional/test_framework/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ def address_to_scriptpubkey(address):
if version is not None:
return program_to_witness_script(version, payload) # testnet segwit scriptpubkey
payload, version = base58_to_byte(address)
if version == 111: # testnet pubkey hash
if version == 34: # testnet pubkey hash
return keyhash_to_p2pkh_script(payload)
elif version == 196: # testnet script hash
elif version == 50: # testnet script hash
return scripthash_to_p2sh_script(payload)
# TODO: also support other address formats
else:
Expand Down
15 changes: 7 additions & 8 deletions test/functional/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ def get_temp_default_datadir(temp_dir: pathlib.Path) -> Tuple[dict, pathlib.Path
temp_dir, as well as the complete path it would return."""
if sys.platform == "win32":
env = dict(APPDATA=str(temp_dir))
datadir = temp_dir / "Bitcoin"
datadir = temp_dir / "BGL"
else:
env = dict(HOME=str(temp_dir))
if sys.platform == "darwin":
datadir = temp_dir / "Library/Application Support/Bitcoin"
datadir = temp_dir / "Library/Application Support/BGL"
else:
datadir = temp_dir / ".BGL"
return env, datadir
Expand Down Expand Up @@ -504,12 +504,12 @@ def find_output(node, txid, amount, *, blockhash=None):

# Create large OP_RETURN txouts that can be appended to a transaction
# to make it large (helper for constructing large transactions). The
# total serialized size of the txouts is about 66k vbytes.
# total serialized size of the txouts is about 6k vbytes.
def gen_return_txouts():
from .messages import CTxOut
from .script import CScript, OP_RETURN
txouts = [CTxOut(nValue=0, scriptPubKey=CScript([OP_RETURN, b'\x01'*67437]))]
assert_equal(sum([len(txout.serialize()) for txout in txouts]), 67456)
txouts = [CTxOut(nValue=0, scriptPubKey=CScript([OP_RETURN, b'\x01'*6743]))]
assert_equal(sum([len(txout.serialize()) for txout in txouts]), 6758)
return txouts


Expand All @@ -531,11 +531,10 @@ def create_lots_of_big_transactions(mini_wallet, node, fee, tx_batch_size, txout


def mine_large_block(test_framework, mini_wallet, node):
# generate a 66k transaction,
# and 14 of them is close to the 1MB block limit
# generate a large block with 16 transactions close to the 400kB block limit
txouts = gen_return_txouts()
fee = 100 * node.getnetworkinfo()["relayfee"]
create_lots_of_big_transactions(mini_wallet, node, fee, 14, txouts)
create_lots_of_big_transactions(mini_wallet, node, fee, 16, txouts)
test_framework.generate(node, 1)


Expand Down
2 changes: 1 addition & 1 deletion test/functional/wallet_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def run_test(self):

# At this point, there are 214 blocks (103 for setup, then 10 rounds, then 101.)
# 114 are mature, so the sum of all wallets should be 114 * 200 = 22800.
assert_equal(total, 22800)
assert_equal(round(total), 22800)

##
# Test restoring spender wallets from backups
Expand Down
Loading

0 comments on commit c894101

Please sign in to comment.