MCPcopy Create free account
hub / github.com/chain/Core / checkIssuanceWindow

Method checkIssuanceWindow

protocol/tx.go:57–69  ·  view source on GitHub ↗
(tx *bc.Tx)

Source from the content-addressed store, hash-verified

55}
56
57func (c *Chain) checkIssuanceWindow(tx *bc.Tx) error {
58 if c.MaxIssuanceWindow == 0 {
59 return nil
60 }
61 for _, entryID := range tx.InputIDs {
62 if _, err := tx.Issuance(entryID); err == nil {
63 if tx.MinTimeMs+bc.DurationMillis(c.MaxIssuanceWindow) < tx.MaxTimeMs {
64 return errors.WithDetailf(ErrBadTx, "issuance input's time window is larger than the network maximum (%s)", c.MaxIssuanceWindow)
65 }
66 }
67 }
68 return nil
69}

Callers 1

ValidateTxMethod · 0.95

Calls 1

IssuanceMethod · 0.80

Tested by

no test coverage detected