I solved it querying the Elrond's API until the transaction has "success" state (not very efficient).
def waiting_for_results(proxy, start_time, hashes):
i = 0
found = []
found_data = []
while len(found) < NUM_TRANS:
try:
data = proxy.get_transaction(hashes[str(i)], with_results=True)
dictio = data.to_dictionary()
print(i, end = "\r")
if dictio['status'] == 'success' and not found.__contains__(hashes[str(i)]):
ti, st, ep, ro, so, de = itemgetter('timestamp', 'status', 'epoch', 'round', 'sourceShard', 'destinationShard')(dictio)
obj = {
'hash': hashes[str(i)],
'start_time': start_time,
'end_time': current_milli_time(),
'timestamp': ti,
'status': st,
'epoch': ep,
'round': ro,
'sourceShard': so,
'destinationShard': de
}
found_data.append(obj)
found.append(hashes[str(i)])
except:
pass
finally:
i = (i+1)%NUM_TRANS
return found_data