Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ledger change to take into account cancelled message balance change #4715

Merged
merged 6 commits into from
Jul 2, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion massa-execution-worker/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ impl ExecutionContext {
let deferred_credits_transfers = self.execute_deferred_credits(&slot);

// take the ledger changes first as they are needed for async messages and cache
Leo-Besancon marked this conversation as resolved.
Show resolved Hide resolved
let ledger_changes = self.speculative_ledger.take();
let mut ledger_changes = self.speculative_ledger.get_snapshot();
Leo-Besancon marked this conversation as resolved.
Show resolved Hide resolved

// settle emitted async messages and reimburse the senders of deleted messages
let deleted_messages = self
Expand All @@ -908,6 +908,8 @@ impl ExecutionContext {
}
}

ledger_changes = self.speculative_ledger.take();

// update module cache
let bc_updates = ledger_changes.get_bytecode_updates();
{
Expand Down