Interface WorldStatePreimageStorage.Updater
- Enclosing interface:
WorldStatePreimageStorage
public static interface WorldStatePreimageStorage.Updater
A write transaction for batching preimage insertions into world state preimage storage.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcommit()Atomically persists all staged preimage mappings to the underlying storage.putAccountTrieKeyPreimage(org.apache.tuweni.bytes.Bytes32 trieKey, org.hyperledger.besu.datatypes.Address preimage) Stages a mapping from an account trie key to its original address preimage.putStorageTrieKeyPreimage(org.apache.tuweni.bytes.Bytes32 trieKey, org.apache.tuweni.units.bigints.UInt256 preimage) Stages a mapping from a storage trie key to its original slot index preimage.voidrollback()Discards all staged preimage mappings without writing to the underlying storage.
-
Method Details
-
putStorageTrieKeyPreimage
WorldStatePreimageStorage.Updater putStorageTrieKeyPreimage(org.apache.tuweni.bytes.Bytes32 trieKey, org.apache.tuweni.units.bigints.UInt256 preimage) Stages a mapping from a storage trie key to its original slot index preimage.- Parameters:
trieKey- the hash of the slot indexpreimage- the originalUInt256storage slot index- Returns:
- this updater, to allow method chaining
-
putAccountTrieKeyPreimage
WorldStatePreimageStorage.Updater putAccountTrieKeyPreimage(org.apache.tuweni.bytes.Bytes32 trieKey, org.hyperledger.besu.datatypes.Address preimage) Stages a mapping from an account trie key to its original address preimage.- Parameters:
trieKey- the hash of the addresspreimage- the originalAddress- Returns:
- this updater, to allow method chaining
-
commit
void commit()Atomically persists all staged preimage mappings to the underlying storage. -
rollback
void rollback()Discards all staged preimage mappings without writing to the underlying storage.
-