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

Method TimeRange

protocol/bc/tx.go:37–47  ·  view source on GitHub ↗
(id Hash)

Source from the content-addressed store, hash-verified

35)
36
37func (tx *Tx) TimeRange(id Hash) (*TimeRange, error) {
38 e, ok := tx.Entries[id]
39 if !ok || e == nil {
40 return nil, errors.Wrapf(ErrMissingEntry, "id %x", id.Bytes())
41 }
42 tr, ok := e.(*TimeRange)
43 if !ok {
44 return nil, errors.Wrapf(ErrEntryType, "entry %x has unexpected type %T", id.Bytes(), e)
45 }
46 return tr, nil
47}
48
49func (tx *Tx) Output(id Hash) (*Output, error) {
50 e, ok := tx.Entries[id]

Callers 2

ApplyTxMethod · 0.80
checkValidFunction · 0.80

Calls 1

BytesMethod · 0.45

Tested by

no test coverage detected