Simple transaction processor in Rust.
- Errors encountered when processing transactions are currently logged to
stderr
, but are not acted upon, or logged to a log file for inspection. - Errors in the formatting of the CSV file containing the transactions are currently not handled.
- The records in the transactions CSV file are read using
csv::Reader::deserialize
. The buffer size used by thecsv::Reader
can be configured using thebuffer_capacity
function, but the default value is being used at the moment. Benchmarking could determine if a different value is more appropriate. - The transaction processing functions are currently not thread-safe.
- Atomicity is currently not guaranteed during transaction processing, but the critical sections have been identified in the code.
- Decimal precision is currently configured to 4 digits, but can be changed using the
DECIMAL_PRECISION
const. - At the moment, accounts that are locked will no longer process transactions.
tx-processor transactions.csv
The state of all the accounts will be printed to stdout
.
Errors encountered while processing transactions will be printed to stderr
.