File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
database/plugin/metadata/sqlite Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ func (d *MetadataStoreSqlite) GetUtxosAddedAfterSlot(
5454) ([]models.Utxo , error ) {
5555 var ret []models.Utxo
5656 if txn != nil {
57- result := txn .Where ("added_slot > 0 " , slot ).
57+ result := txn .Where ("added_slot > ? " , slot ).
5858 Order ("id DESC" ).
5959 Find (& ret )
6060 if result .Error != nil {
6161 return ret , result .Error
6262 }
6363 } else {
64- result := d .DB ().Where ("added_slot > 0 " , slot ).
64+ result := d .DB ().Where ("added_slot > ? " , slot ).
6565 Order ("id DESC" ).
6666 Find (& ret )
6767 if result .Error != nil {
@@ -180,13 +180,13 @@ func (d *MetadataStoreSqlite) DeleteUtxosAfterSlot(
180180 txn * gorm.DB ,
181181) error {
182182 if txn != nil {
183- result := txn .Where ("deleted_slot > ?" , slot ).
183+ result := txn .Where ("added_slot > ?" , slot ).
184184 Delete (& models.Utxo {})
185185 if result .Error != nil {
186186 return result .Error
187187 }
188188 } else {
189- result := d .DB ().Where ("deleted_slot > ?" , slot ).
189+ result := d .DB ().Where ("added_slot > ?" , slot ).
190190 Delete (& models.Utxo {})
191191 if result .Error != nil {
192192 return result .Error
You can’t perform that action at this time.
0 commit comments