IsContainTransaction return whether the transaction is in store
(txHash common.Uint256)
| 411 | |
| 412 | //IsContainTransaction return whether the transaction is in store |
| 413 | func (this *BlockStore) ContainTransaction(txHash common.Uint256) (bool, error) { |
| 414 | key := this.getTransactionKey(txHash) |
| 415 | |
| 416 | if this.enableCache { |
| 417 | if this.cache.ContainTransaction(txHash) { |
| 418 | return true, nil |
| 419 | } |
| 420 | } |
| 421 | _, err := this.store.Get(key) |
| 422 | if err != nil { |
| 423 | if err == scom.ErrNotFound { |
| 424 | return false, nil |
| 425 | } |
| 426 | return false, err |
| 427 | } |
| 428 | return true, nil |
| 429 | } |
| 430 | |
| 431 | //GetVersion return the version of store |
| 432 | func (this *BlockStore) GetVersion() (byte, error) { |
nothing calls this directly
no test coverage detected