(tx *bc.Tx)
| 55 | } |
| 56 | |
| 57 | func (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 | } |