chore(provider): log proper transition id (#1915)

This commit is contained in:
Roman Krasiuk
2023-03-22 22:23:20 +02:00
committed by GitHub
parent 076fd54225
commit 4cc3a444e1

View File

@@ -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!(),
}