Discussion draft: change DB Writer to take value references (#13672)

This commit is contained in:
James Prestwich
2025-01-07 12:38:09 -05:00
committed by GitHub
parent 2b301aa102
commit 3e980e61d8
41 changed files with 149 additions and 137 deletions

View File

@ -287,7 +287,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
let provider_rw = provider_factory.provider_rw()?;
provider_rw.append_blocks_with_state(
Vec::from([block_with_senders]),
execution_outcome,
&execution_outcome,
hashed_post_state.into_sorted(),
trie_updates,
)?;

View File

@ -177,7 +177,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
.map_err(|_| BlockValidationError::SenderRecoveryError)?,
)?;
provider_rw.write_state(
execution_outcome,
&execution_outcome,
OriginalValuesKnown::No,
StorageLocation::Database,
)?;

View File

@ -169,7 +169,7 @@ impl<C: ChainSpecParser<ChainSpec = ChainSpec>> Command<C> {
let execution_outcome = executor.finalize();
provider_rw.write_state(
execution_outcome,
&execution_outcome,
OriginalValuesKnown::Yes,
StorageLocation::Database,
)?;