From 4cc3a444e111b714c13d94df1408bbfa44256853 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Wed, 22 Mar 2023 22:23:20 +0200 Subject: [PATCH] chore(provider): log proper transition id (#1915) --- crates/storage/provider/src/post_state.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/crates/storage/provider/src/post_state.rs b/crates/storage/provider/src/post_state.rs index 7137838bab..077b5b0b5c 100644 --- a/crates/storage/provider/src/post_state.rs +++ b/crates/storage/provider/src/post_state.rs @@ -479,18 +479,16 @@ impl PostState { Change::AccountDestroyed { id, address, old } | Change::AccountChanged { id, address, old, .. } => { let destroyed = matches!(changeset, Change::AccountDestroyed { .. }); - tracing::trace!(target: "provider::post_state", id, ?address, ?old, destroyed, "Account changed"); - account_changeset_cursor.append_dup( - first_transition_id + id, - AccountBeforeTx { address, info: Some(old) }, - )?; + let transition_id = first_transition_id + id; + tracing::trace!(target: "provider::post_state", transition_id, ?address, ?old, destroyed, "Account changed"); + account_changeset_cursor + .append_dup(transition_id, AccountBeforeTx { address, info: Some(old) })?; } Change::AccountCreated { id, address, .. } => { - tracing::trace!(target: "provider::post_state", id, ?address, "Account created"); - account_changeset_cursor.append_dup( - first_transition_id + id, - AccountBeforeTx { address, info: None }, - )?; + let transition_id = first_transition_id + id; + tracing::trace!(target: "provider::post_state", transition_id, ?address, "Account created"); + account_changeset_cursor + .append_dup(transition_id, AccountBeforeTx { address, info: None })?; } _ => unreachable!(), }