Unverified Commit d3e3a460 authored by Patrick O'Grady's avatar Patrick O'Grady Committed by GitHub

core/rawdb: fix logs to print block number, not address (#23328)

parent 28ba686c
...@@ -106,7 +106,7 @@ func ReadTransaction(db ethdb.Reader, hash common.Hash) (*types.Transaction, com ...@@ -106,7 +106,7 @@ func ReadTransaction(db ethdb.Reader, hash common.Hash) (*types.Transaction, com
} }
body := ReadBody(db, blockHash, *blockNumber) body := ReadBody(db, blockHash, *blockNumber)
if body == nil { if body == nil {
log.Error("Transaction referenced missing", "number", blockNumber, "hash", blockHash) log.Error("Transaction referenced missing", "number", *blockNumber, "hash", blockHash)
return nil, common.Hash{}, 0, 0 return nil, common.Hash{}, 0, 0
} }
for txIndex, tx := range body.Transactions { for txIndex, tx := range body.Transactions {
...@@ -114,7 +114,7 @@ func ReadTransaction(db ethdb.Reader, hash common.Hash) (*types.Transaction, com ...@@ -114,7 +114,7 @@ func ReadTransaction(db ethdb.Reader, hash common.Hash) (*types.Transaction, com
return tx, blockHash, *blockNumber, uint64(txIndex) return tx, blockHash, *blockNumber, uint64(txIndex)
} }
} }
log.Error("Transaction not found", "number", blockNumber, "hash", blockHash, "txhash", hash) log.Error("Transaction not found", "number", *blockNumber, "hash", blockHash, "txhash", hash)
return nil, common.Hash{}, 0, 0 return nil, common.Hash{}, 0, 0
} }
...@@ -137,7 +137,7 @@ func ReadReceipt(db ethdb.Reader, hash common.Hash, config *params.ChainConfig) ...@@ -137,7 +137,7 @@ func ReadReceipt(db ethdb.Reader, hash common.Hash, config *params.ChainConfig)
return receipt, blockHash, *blockNumber, uint64(receiptIndex) return receipt, blockHash, *blockNumber, uint64(receiptIndex)
} }
} }
log.Error("Receipt not found", "number", blockNumber, "hash", blockHash, "txhash", hash) log.Error("Receipt not found", "number", *blockNumber, "hash", blockHash, "txhash", hash)
return nil, common.Hash{}, 0, 0 return nil, common.Hash{}, 0, 0
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment