Emurgo / project-icarus-importer

Icarus, a reference implementation for a lightweight wallet developed by the IOHK Engineering Team.
Other
4 stars 2 forks source link

Remove bad default from tx_state #6

Open SebastienGllmt opened 5 years ago

SebastienGllmt commented 5 years ago

As seen here, the tx_state can default to true https://github.com/Emurgo/project-icarus-importer/blob/icarus-master/scripts/generate/blockImporterTables-beta.sql#L18

This doesn't make sense because tx_state is based off the following data constructor https://github.com/Emurgo/project-icarus-importer/blob/icarus-master/blockchain-importer/src/Pos/BlockchainImporter/Tables/TxsTable.hs#L66

In fact, if you enter true into the database this will for sure break thing in the frontend.

I strongly suspect there is no reason we have this default other than while Icarus was still under development, the table used to have a field in the table succeeded boolean DEFAULT true that was eventually removed and they just forgot to get rid of the default.

Somebody needs to investigate to see if this default is really needed.