mirror of
https://github.com/alexgo-io/gaze-indexer.git
synced 2026-01-12 16:53:08 +08:00
fix: empty etched at
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/cockroachdb/errors"
|
||||
"github.com/gaze-network/indexer-network/common"
|
||||
@@ -138,6 +139,9 @@ func (p *Processor) ensureGenesisRune(ctx context.Context) error {
|
||||
BurnedAmount: uint128.Zero,
|
||||
CompletedAt: time.Time{},
|
||||
CompletedAtHeight: nil,
|
||||
EtchingBlock: 1,
|
||||
EtchingTxHash: chainhash.Hash{},
|
||||
EtchedAt: time.Time{},
|
||||
}
|
||||
if err := p.runesDg.CreateRuneEntry(ctx, runeEntry, genesisRuneId.BlockHeight); err != nil {
|
||||
return errors.Wrap(err, "failed to create genesis rune entry")
|
||||
|
||||
@@ -221,11 +221,7 @@ func mapRuneEntryTypeToParams(src runes.RuneEntry, blockHeight uint64) (gen.Crea
|
||||
}
|
||||
}
|
||||
}
|
||||
var etchedAt pgtype.Timestamp
|
||||
if !src.EtchedAt.IsZero() {
|
||||
etchedAt.Time = src.EtchedAt
|
||||
etchedAt.Valid = true
|
||||
}
|
||||
etchedAt := pgtype.Timestamp{Time: time.Time{}, Valid: true}
|
||||
|
||||
return gen.CreateRuneEntryParams{
|
||||
RuneID: runeId,
|
||||
|
||||
Reference in New Issue
Block a user