pegnet / pegnetd

The pegnet daemon to track txs, conversions, etc
Other
13 stars 14 forks source link

Fix Pegnet.InsertRates invalid/old PTicker bug #61

Closed sambarnes closed 4 years ago

sambarnes commented 4 years ago

There is a bug that was encountered syncing against mainnet, where the old PTickers that we dropped are not in the fat2 package (and really shouldn't be since theyll never be used for transactions).

But this meant that they were inserted as PTickerInvalid in the database, and with multiple assets that were dropped, this broke the unique constraint on the pn_rates table.

Switched back to using a ticker string in the InsertRates function to accommodate until we come up with a more elegant solution to managing old/new asset tickers and when they are valid