Skip to content

Commit d9db1d6

Browse files
committed
core/rawdb: simplify HasCanonicalTransaction
Signed-off-by: Csaba Kiraly <[email protected]>
1 parent 80efb72 commit d9db1d6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/rawdb/accessors_indexes.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ func findTxInBlockBody(blockbody rlp.RawValue, target common.Hash) (*types.Trans
176176

177177
// HasCanonicalTransaction checks whether a specific transaction is in the database.
178178
func HasCanonicalTransaction(db ethdb.Reader, hash common.Hash) bool {
179-
blockNumber := ReadTxLookupEntry(db, hash)
180-
return blockNumber != nil
179+
return ReadTxLookupEntry(db, hash) != nil
181180
}
182181

183182
// ReadCanonicalTransaction retrieves a specific transaction from the database, along

0 commit comments

Comments
 (0)