chips-blockchain / bet

This repository holds the implementation code of Pangea Poker white paper: https://bit.ly/3bdCz0Z
https://chips.cash
16 stars 17 forks source link

On first execution of "bet" command always crashes complaining about DB and starts fine on second attempt #172

Closed satindergrewal closed 3 years ago

satindergrewal commented 3 years ago

When executing bet command for the first time, it aborts the command and errors about database.

satinder@cashier1:~/bet/privatebet$ ./bet cashier <IP_HERE>
ln is in sync with chips
sqlite3_init_db_name::36::db_name::/home/satinder/.bet/db/pangea.db
corrupted size vs. prev_size
Aborted
satinder@cashier1:~/bet/privatebet$

After this error, when executing the same command next time, the program moves forward with further operations.

There needs to be a condition put in place for relevant part of the code which creates the database if it's already not present, and then proceed with next set of operations.

sg777 commented 3 years ago

This issue has been fixed.