forked from TrueCloudLab/neoneo-go
core: remove unused blockchain API
`(*Blockchain).HasTransaction` is one of the oldest methods in our codebase, and currently it's completely unused. I also doubt that this method works as expected because it returns `true` if transaction in the mempool. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
862c2e4ed3
commit
0a2be89964
1 changed files with 0 additions and 9 deletions
|
@ -2174,15 +2174,6 @@ func (bc *Blockchain) GetHeader(hash util.Uint256) (*block.Header, error) {
|
||||||
return &block.Header, nil
|
return &block.Header, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasTransaction returns true if the blockchain contains he given
|
|
||||||
// transaction hash.
|
|
||||||
func (bc *Blockchain) HasTransaction(hash util.Uint256) bool {
|
|
||||||
if bc.memPool.ContainsKey(hash) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return errors.Is(bc.dao.HasTransaction(hash), dao.ErrAlreadyExists)
|
|
||||||
}
|
|
||||||
|
|
||||||
// HasBlock returns true if the blockchain contains the given
|
// HasBlock returns true if the blockchain contains the given
|
||||||
// block hash.
|
// block hash.
|
||||||
func (bc *Blockchain) HasBlock(hash util.Uint256) bool {
|
func (bc *Blockchain) HasBlock(hash util.Uint256) bool {
|
||||||
|
|
Loading…
Reference in a new issue