aboutsummaryrefslogtreecommitdiff
path: root/tests/functional_tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-05-28 12:48:38 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2020-05-28 12:49:17 +0000
commit9b86e14c5ac6e49f77a68f0833fc0bba10668e45 (patch)
treee4399531426d2c50579b39b16078ac362a932396 /tests/functional_tests
parentrpc: fix relay_tx error return mixup (diff)
downloadmonero-9b86e14c5ac6e49f77a68f0833fc0bba10668e45.tar.xz
functional_tests: add simple relay_tx test
Diffstat (limited to '')
-rwxr-xr-xtests/functional_tests/txpool.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/functional_tests/txpool.py b/tests/functional_tests/txpool.py
index 27ae89764..9b64ef994 100755
--- a/tests/functional_tests/txpool.py
+++ b/tests/functional_tests/txpool.py
@@ -241,6 +241,17 @@ class TransferTest():
assert x.fee == txes[txid].fee
assert x.tx_blob == txes[txid].tx_blob
+ print('Checking relaying txes')
+ res = daemon.get_transaction_pool_hashes()
+ assert len(res.tx_hashes) > 0
+ txid = res.tx_hashes[0]
+ daemon.relay_tx([txid])
+ res = daemon.get_transactions([txid])
+ assert len(res.txs) == 1
+ assert res.txs[0].tx_hash == txid
+ assert res.txs[0].in_pool
+ assert res.txs[0].relayed
+
daemon.flush_txpool()
self.check_empty_pool()