Commit Graph

30 Commits

Author SHA1 Message Date
Greg Fitzgerald
4b07772e22 Add helper functions for reading entries
```rust
let entries = entry_writer::read_entries_from_str(entries_str).unwrap();
let entries_len = entries.len();
assert_eq!(entries_len, 7);
let bank = Bank::default();
bank.process_ledger(entries).unwrap();
assert_eq!(bank.transaction_count(), entries_len - 2);
```
2018-07-03 19:32:01 -06:00
Greg Fitzgerald
88a6fb86bf Clean up read_entries() and its usage 2018-07-03 16:33:36 -06:00
Greg Fitzgerald
4e3526394e Use IntoInterator to simplify write_entries() usage 2018-07-02 09:51:39 -06:00
Greg Fitzgerald
ec7e50b37d Consolidate ledger serialization code
The new read_entries() works, but is overly-contrained. Not
using that function yet, but adding it here in the hopes some
Rust guru will tell us how to get that lifetime constraint out
of there.

Fixes #517
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
669164bada Boot EntryWriter's Mutex
Finally!
2018-07-01 17:29:24 -06:00
Greg Fitzgerald
4f3a291391 Move the writer into EntryWriter 2018-07-01 17:29:24 -06:00
Greg Fitzgerald
09e9139855 Move channel code to write stage 2018-07-01 17:29:24 -06:00
Greg Fitzgerald
76fc5822c9 Send Vec<Entry> between stages instead of Entry
Might see a performance boost here.
2018-07-01 17:29:24 -06:00
Greg Fitzgerald
c767a854ed Remove useless Arc 2018-07-01 11:35:32 -07:00
Greg Fitzgerald
b60802ddff Refactor such that genesis can use entry_writer 2018-07-01 11:35:32 -07:00
Greg Fitzgerald
1c35d59f26 Receive entries first, then write 2018-07-01 11:35:32 -07:00
Greg Fitzgerald
adcaf715c6 Cleanup write_entries 2018-07-01 11:35:32 -07:00
Greg Fitzgerald
1f9494221b Make space for a write_entry() that only writes entries 2018-07-01 11:35:32 -07:00
Greg Fitzgerald
466d6f76b9 Don't hide error in write_entry() 2018-07-01 11:35:32 -07:00
Greg Fitzgerald
63cfbb9497 Only register last entry after a split 2018-06-28 16:54:06 -06:00
Greg Fitzgerald
4aedd3f1b6 Cleanup type aliases and imports 2018-06-27 15:06:18 -06:00
Greg Fitzgerald
5aaa38bcaf Better docs for write_stage 2018-06-07 09:25:36 -06:00
Greg Fitzgerald
9c9c63572b cargo fmt
rustfmt was updated with 1.26.1
2018-05-29 20:33:45 -07:00
Greg Fitzgerald
2b1e90b0a5 More idiomatic Rust 2018-05-29 14:04:27 -06:00
Anatoly Yakovenko
83c11f0f9d logs 2018-05-24 17:40:33 -06:00
Anatoly Yakovenko
2d635386af rebased 2018-05-14 15:20:41 -07:00
Greg Fitzgerald
d2dd005a59 accountant -> bank 2018-05-14 15:33:11 -06:00
Greg Fitzgerald
cc447c0fda Drop support for EntryInfo subscriptions 2018-05-14 09:53:57 -06:00
Greg Fitzgerald
aec05ef602 Move RequestProcessor into its own module 2018-05-12 17:50:55 -06:00
Greg Fitzgerald
b2e3299539 Only pass accountant write_service 2018-05-12 17:30:15 -06:00
Greg Fitzgerald
a3869dd4c1 Move entry_receiver to RequestStage
This can move to AccountingStage once RequestStage stops
calling process_events().
2018-05-12 15:14:37 -06:00
Greg Fitzgerald
a3d2831f8c Free up the name 'accounting_stage' 2018-05-12 14:05:57 -06:00
Greg Fitzgerald
898f4971a2 Free up name 'thin_client_service' 2018-05-12 10:50:22 -06:00
Greg Fitzgerald
cd96843699 Free up name ThinClientService 2018-05-11 23:37:14 -06:00
Greg Fitzgerald
ca80bc33c6 Move the writer stage's utilities to its own module 2018-05-11 22:36:16 -06:00