SiaFoundation/hostd

Add timestamps to contract API responses

Offen

#376 geöffnet am 01.05.2024

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (27 Forks)auto 404
featuregood first issue

Repository-Metriken

Stars
 (68 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Description

The contract data in the UI currently uses estimates based on block heights for all timestamps. Once the block has passed, the actual timestamp should be used instead.

This requires a few changes across hostd:

  • Add additional columns to the contracts table for the timestamps
    • Negotiation timestamp
    • Window start timestamp
    • Window end timestamp
    • Resolution timestamp
    • Payout timestamp
  • Update the corresponding columns during block processing
  • Add the fields to the Contract type and API response

Contributor Guide