correct_accounts#

correct_accounts(state, corrections, strategy_cycle_included_at, tx_builder, interactive=True, unknown_token_receiver=None)[source]#

Apply the accounting corrections on the state (internal ledger).

  • Change values of the underlying positions

  • Create BalanceUpdate events and store them in the state

  • Create BalanceUpdateRefs and store them in the state

Note

You need to iterate the returend iterator to have any of the corrections applied.

Returns:

Iterator of corrections.

Parameters:
Return type:

Iterable[BalanceUpdate]