iotaledger / iota-sdk

The IOTA SDK provides developers with a seamless experience to develop on IOTA by providing account abstractions and clients to interact with node APIs.
Apache License 2.0
57 stars 41 forks source link

Improve wait_for_transaction_acceptance #2177

Closed Thoralf-M closed 6 months ago

Thoralf-M commented 6 months ago

Description of change

Don't error with NotFound for the first attempts in wait_for_transaction_acceptance as the node may not have fully processed the tx at this point

Type of change

How the change has been tested

Sending transactions with many outputs and then calling wait_for_transaction_acceptance() on them which failed before

2024-03-13 08:37:57 (UTC) iota_sdk::client::api::wait_for_tx_acceptance DEBUG [wait_for_transaction_acceptance]
2024-03-13 08:37:57 (UTC) iota_sdk::client::node_manager::http_client DEBUG GET: 36 ms for 404 Not Found http://localhost:8050/api/core/v3/transactions/0x8a502496881e05fa5ed60a86c605e8c93d21fdaeb07220dd41fbf884d9ec16d5e6a50000/metadata
2024-03-13 08:37:58 (UTC) iota_sdk::client::node_manager::http_client DEBUG GET: 35 ms for 200 OK http://localhost:8050/api/core/v3/transactions/0x8a502496881e05fa5ed60a86c605e8c93d21fdaeb07220dd41fbf884d9ec16d5e6a50000/metadata