MCPcopy Create free account
hub / github.com/DNAProject/DNA / GetTransaction

Method GetTransaction

validator/db/store.go:145–155  ·  view source on GitHub ↗
(hash common.Uint256)

Source from the content-addressed store, hash-verified

143}
144
145func (self *Store) GetTransaction(hash common.Uint256) (*types.Transaction, error) {
146 buf, err := self.GetTransactionBytes(hash)
147 if err != nil {
148 return nil, err
149 }
150 txn, err := types.TransactionFromRawBytes(buf)
151 if err != nil {
152 return nil, err
153 }
154 return txn, nil
155}
156
157func (self *Store) Close() error {
158 err := self.db.Close()

Callers

nothing calls this directly

Calls 2

GetTransactionBytesMethod · 0.95
TransactionFromRawBytesFunction · 0.92

Tested by

no test coverage detected