Skip to content
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,10 @@ public static (AddRangeResult result, bool moreChildrenToRight, List<PathWithAcc
codeHashes.Add(account.Account.CodeHash);
}

var account_ = account.Account;
Rlp rlp = account_ is null ? null : account_.IsTotallyEmpty ? StateTree.EmptyAccountRlp : Rlp.Encode(account_);
entries.Add(new PatriciaTree.BulkSetEntry(account.Path, rlp?.Bytes));
if (account is not null)
{
Interlocked.Add(ref Metrics.SnapStateSynced, rlp.Bytes.Length);
}
Account accountValue = account.Account;
Rlp rlp = accountValue.IsTotallyEmpty ? StateTree.EmptyAccountRlp : Rlp.Encode(accountValue);
entries.Add(new PatriciaTree.BulkSetEntry(account.Path, rlp.Bytes));
Interlocked.Add(ref Metrics.SnapStateSynced, rlp.Bytes.Length);
}

tree.BulkSet(entries, PatriciaTree.Flags.WasSorted);
Expand Down