Settle ignores the ledger entry Ledger::Add returns #2
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Catcrafts/Crafter.Review#2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Settlerecords a finished pass withledger->Add(...), which re-reads the shared ledger under its lock and returns the seat's entry as the file has it: every driver's spend, and any credit-out another driver recorded.Settlediscards that entry. Mid-run the seat'sspentUsdstays this process's own sum, and a credit-out recorded by another driver (or, from 1.1.0, byseats) does not take the seat out; passes keep going to it until one of this run's own passes hits the credit error.The Python driver's settle uses the entry: the seat takes the file's spend, and the file's
outSinceputs it out.A fix takes the returned entry's spend and credit-out in
Settle, with a two-ledger test: one driver marks the key out, and the other's next settle puts its seat out.Found by the 1.1.0 push gates.