If a retrieval starts and then fails, we still want to know how long we spent, how much FIL we paid, how much was received, etc. Right now, we just return an error that says uh oh something went wrong!
We will probably want to rename RetrievalStats to RetrievalResult, and if a retrieval fails partway through, instead of returning a non-nil error, we will fill out the RetrievalResult and include an Outcome value or Err error inside of the struct.
Planned like this because returning valid data along with a non-nil error in the return tuple is weird and unexpected.
If a retrieval starts and then fails, we still want to know how long we spent, how much FIL we paid, how much was received, etc. Right now, we just return an error that says uh oh something went wrong!
We will probably want to rename RetrievalStats to RetrievalResult, and if a retrieval fails partway through, instead of returning a non-nil error, we will fill out the RetrievalResult and include an Outcome value or Err error inside of the struct.
Planned like this because returning valid data along with a non-nil error in the return tuple is weird and unexpected.