Don't register entry ID until after processing its transactions
This commit is contained in:
parent
80f07dadc5
commit
587ab29e09
|
@ -265,10 +265,10 @@ impl Bank {
|
||||||
I: IntoIterator<Item = Entry>,
|
I: IntoIterator<Item = Entry>,
|
||||||
{
|
{
|
||||||
for entry in entries {
|
for entry in entries {
|
||||||
self.register_entry_id(&entry.id);
|
|
||||||
for result in self.process_transactions(entry.transactions) {
|
for result in self.process_transactions(entry.transactions) {
|
||||||
result?;
|
result?;
|
||||||
}
|
}
|
||||||
|
self.register_entry_id(&entry.id);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue