Files
zeekayandHanzo Dev b1cc108c9f gofmt
Co-authored-by: Hanzo Dev <[email protected]>
2026-09-08 01:51:51 -07:00

30 lines
693 B
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package status
import (
"fmt"
"github.com/go-json-experiment/json"
"github.com/go-json-experiment/json/jsontext"
"time"
"github.com/luxfi/ids"
"github.com/luxfi/node/vms/example/xsvm/tx"
)
type TxIssuance struct {
Tx *tx.Tx
TxID ids.ID
Nonce uint64
StartTime time.Time
}
func (s *TxIssuance) String() string {
txJSON, err := json.Marshal(s.Tx, jsontext.WithIndent(" "))
if err != nil {
return "failed to marshal transaction: " + err.Error()
}
return fmt.Sprintf("issued tx %s in %s\n%s\n", s.TxID, time.Since(s.StartTime), string(txJSON))
}