If we have validated a snapshot chain during this runtime, copy its chainstate directory over to the main chainstate location, completing validation of the snapshot.

Synopsis

Declared in <validation.h>

[[requires_capability(0x7f2e1bc18078), requires_capability(0x7f2e146b63c8), requires_capability(0x7f2e298fb798), requires_capability(0x7f2e360b8ef8)]]
bool
ValidatedSnapshotCleanup(
    Chainstate& validated_cs,
    Chainstate& unvalidated_cs);

Description

If the cleanup succeeds, the caller will need to ensure chainstates are reinitialized, since ResetChainstates() will be called before leveldb directories are moved or deleted.

Return Value

true if the cleanup completed successfully.

Parameters

Name

Description

validated_cs

The validated chainstate whose directory is moved into place.

unvalidated_cs

The snapshot chainstate that is being superseded.

Created with MrDocs