GetTransaction return transaction by transaction hash
(txHash common.Uint256)
| 370 | |
| 371 | //GetTransaction return transaction by transaction hash |
| 372 | func (this *BlockStore) GetTransaction(txHash common.Uint256) (*types.Transaction, uint32, error) { |
| 373 | if this.enableCache { |
| 374 | tx, height := this.cache.GetTransaction(txHash) |
| 375 | if tx != nil { |
| 376 | return tx, height, nil |
| 377 | } |
| 378 | } |
| 379 | return this.loadTransaction(txHash) |
| 380 | } |
| 381 | |
| 382 | func (this *BlockStore) loadTransaction(txHash common.Uint256) (*types.Transaction, uint32, error) { |
| 383 | key := this.getTransactionKey(txHash) |
no test coverage detected