Fantom-foundation / Sonic

go-opera fork for Carmen and Tosca integration
GNU Lesser General Public License v3.0
14 stars 16 forks source link

Avoid overriding already initialized datadir #145

Closed thaarok closed 3 months ago

thaarok commented 3 months ago

When the database is already initialized, avoid overriding it by the sonictool genesis tool:

sonictool --datadir=/tmp/opera genesis fake 1
database in datadir is already initialized: database directories 'chaindata' and 'carmen' already exists

When any of the carmen or chaindata directories are missing, the database is supposed to be corrupted, directories are removed and recreated from the genesis file.