@@ -33,6 +33,7 @@ import (
33
33
func ReadTxLookupEntry (db ethdb.Reader , hash common.Hash ) * uint64 {
34
34
data , _ := db .Get (txLookupKey (hash ))
35
35
if len (data ) == 0 {
36
+ log .Error ("txLookupKey get failed" , "hash" , hash )
36
37
return nil
37
38
}
38
39
// Database v6 tx lookup just stores the block number
@@ -98,10 +99,12 @@ func DeleteTxLookupEntries(db ethdb.KeyValueWriter, hashes []common.Hash) {
98
99
func ReadTransaction (db ethdb.Reader , hash common.Hash ) (* types.Transaction , common.Hash , uint64 , uint64 ) {
99
100
blockNumber := ReadTxLookupEntry (db , hash )
100
101
if blockNumber == nil {
102
+ log .Error ("ReadTxLookupEntry failed" , "hash" , hash )
101
103
return nil , common.Hash {}, 0 , 0
102
104
}
103
105
blockHash := ReadCanonicalHash (db , * blockNumber )
104
106
if blockHash == (common.Hash {}) {
107
+ log .Error ("ReadCanonicalHash failed" , "number" , blockNumber , "hash" , hash )
105
108
return nil , common.Hash {}, 0 , 0
106
109
}
107
110
body := ReadBody (db , blockHash , * blockNumber )
0 commit comments