Skip to content

Commit

Permalink
better log to find HandleNoneSplitPayments fk issue for real
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Nov 8, 2023
1 parent 83c3512 commit d52fd48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/psql.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (p *Psql) HandleNoneSplitPayments(dbBlockID int64, payments []*pb.NoSplitPa
}

//todo: detect drive vs fleet from backend api
_, err = p.db.Exec("INSERT INTO hivemapper.no_split_payments (mint_id) VALUES ($1) RETURNING id", mintDbID)
_, err = p.tx.Exec("INSERT INTO hivemapper.no_split_payments (mint_id) VALUES ($1) RETURNING id", mintDbID)
if err != nil {
return fmt.Errorf("inserting NoneSplitPayments with mint_id %d mint_to %q tx %q: %w", mintDbID, payment.Mint.To, payment.Mint.TrxHash, err)
}
Expand Down
2 changes: 1 addition & 1 deletion data/sinker.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (s *Sinker) HandleBlockScopedData(ctx context.Context, data *pbsubstreamsrp
}

if err := s.db.HandleNoneSplitPayments(dbBlockID, moduleOutput.NoSplitPayments); err != nil {
return fmt.Errorf("handle split payments: %w", err)
return fmt.Errorf("handle non split payments: %w", err)
}

if err := s.db.HandleTransfers(dbBlockID, moduleOutput.Transfers); err != nil {
Expand Down

0 comments on commit d52fd48

Please sign in to comment.