Address Vito's comments I left

This commit is contained in:
JCW
2026-08-21 17:56:23 +01:00
parent 8e453e8aad
commit 30890b8e19
5 changed files with 304 additions and 0 deletions

View File

@@ -19,6 +19,9 @@ namespace xrpl {
* 1. If `LoanBroker.OwnerCount = 0` the `DirectoryNode` will have at most one
* node (the root), which will only hold entries for `RippleState` or
* `MPToken` objects.
* 2. Under featureLendingProtocolV1_1, an `ltLOAN_BROKER` may only be deleted
* by a `ttLOAN_BROKER_DELETE` transaction, and only when its pre-state
* `DebtTotal` and `OwnerCount` are both zero.
*
*/
class ValidLoanBroker
@@ -36,6 +39,10 @@ class ValidLoanBroker
// pseudo-accounts. Key is the brokerID / index. It will be used to find the
// LoanBroker object if brokerBefore and brokerAfter are nullptr
std::map<uint256, BrokerInfo> brokers_;
// Brokers whose ledger entry was deleted by this transaction. The final
// pre-deletion state is captured so the deletion invariants can inspect
// DebtTotal and OwnerCount.
std::vector<SLE::const_pointer> deletedBrokers_;
// Collect all the modified trust lines. Their high and low accounts will be
// loaded to look for LoanBroker pseudo-accounts.
std::vector<SLE::const_pointer> lines_;