aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-29 19:09:13 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-09-17 11:38:18 +0000
commitf23beb879ef10d80f95080402faf0040eb0b84d1 (patch)
tree14fa1f73ebb889f6903a5f5a3520a5d8b53c825d
parentfunctional_tests: move extraneous stuff out of the framework (diff)
downloadmonero-f23beb879ef10d80f95080402faf0040eb0b84d1.tar.xz
functional_tests: add missing sweep_dust parameters, and test it
though not a very good test, but we don't have dust handy
Diffstat (limited to '')
-rwxr-xr-xtests/functional_tests/transfer.py8
-rw-r--r--utils/python-rpc/framework/wallet.py8
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/functional_tests/transfer.py b/tests/functional_tests/transfer.py
index 7ebda6ebd..867ef8bd3 100755
--- a/tests/functional_tests/transfer.py
+++ b/tests/functional_tests/transfer.py
@@ -45,6 +45,7 @@ class TransferTest():
self.transfer()
self.check_get_bulk_payments()
self.check_double_spend_detection()
+ self.sweep_dust()
self.sweep_single()
self.check_destinations()
@@ -583,6 +584,13 @@ class TransferTest():
assert tx.in_pool
assert tx.double_spend_seen
+ def sweep_dust(self):
+ print("Sweeping dust")
+ daemon = Daemon()
+ self.wallet[0].refresh()
+ res = self.wallet[0].sweep_dust()
+ assert not 'tx_hash_list' in res or len(res.tx_hash_list) == 0 # there's just one, but it cannot meet the fee
+
def sweep_single(self):
daemon = Daemon()
diff --git a/utils/python-rpc/framework/wallet.py b/utils/python-rpc/framework/wallet.py
index 862ac2262..fae6082d7 100644
--- a/utils/python-rpc/framework/wallet.py
+++ b/utils/python-rpc/framework/wallet.py
@@ -142,9 +142,15 @@ class Wallet(object):
}
return self.rpc.send_json_rpc_request(get_balance)
- def sweep_dust(self):
+ def sweep_dust(self, get_tx_keys = True, do_not_relay = False, get_tx_hex = False, get_tx_metadata = False):
sweep_dust = {
'method': 'sweep_dust',
+ 'params': {
+ 'get_tx_keys': get_tx_keys,
+ 'do_not_relay': do_not_relay,
+ 'get_tx_hex': get_tx_hex,
+ 'get_tx_metadata': get_tx_metadata,
+ },
'jsonrpc': '2.0',
'id': '0'
}