mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
core/rawdb: simplify HasCanonicalTransaction
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
8197ceef16
commit
69341bc95a
1 changed files with 1 additions and 2 deletions
|
|
@ -176,8 +176,7 @@ func findTxInBlockBody(blockbody rlp.RawValue, target common.Hash) (*types.Trans
|
|||
|
||||
// HasCanonicalTransaction checks whether a specific transaction is in the database.
|
||||
func HasCanonicalTransaction(db ethdb.Reader, hash common.Hash) bool {
|
||||
blockNumber := ReadTxLookupEntry(db, hash)
|
||||
return blockNumber != nil
|
||||
return ReadTxLookupEntry(db, hash) != nil
|
||||
}
|
||||
|
||||
// ReadCanonicalTransaction retrieves a specific transaction from the database, along
|
||||
|
|
|
|||
Loading…
Reference in a new issue