mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 10:37:37 -07:00
Merge pull request #6599
6e4a55b
rpc: fix relay_tx error return mixup (moneromooo-monero)9b86e14
functional_tests: add simple relay_tx test (moneromooo-monero)
This commit is contained in:
commit
3057f52f89
@ -2816,7 +2816,7 @@ namespace cryptonote
|
||||
crypto::hash txid = *reinterpret_cast<const crypto::hash*>(txid_data.data());
|
||||
|
||||
cryptonote::blobdata txblob;
|
||||
if (!m_core.get_pool_transaction(txid, txblob, relay_category::legacy))
|
||||
if (m_core.get_pool_transaction(txid, txblob, relay_category::legacy))
|
||||
{
|
||||
NOTIFY_NEW_TRANSACTIONS::request r;
|
||||
r.txs.push_back(std::move(txblob));
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user