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

Method GetTransactionBytes

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

Source from the content-addressed store, hash-verified

135}
136
137func (self *Store) GetTransactionBytes(hash common.Uint256) ([]byte, error) {
138 key := GenDataTransactionKey(hash)
139 defer keyPool.Put(key)
140 txn, err := self.db.Get(key.Bytes())
141
142 return txn, err
143}
144
145func (self *Store) GetTransaction(hash common.Uint256) (*types.Transaction, error) {
146 buf, err := self.GetTransactionBytes(hash)

Callers 2

ContainTransactionMethod · 0.95
GetTransactionMethod · 0.95

Calls 4

GenDataTransactionKeyFunction · 0.85
PutMethod · 0.65
GetMethod · 0.65
BytesMethod · 0.45

Tested by

no test coverage detected