Skip to content

Commit

Permalink
core/rawdb: fix logs to print block number, not address (ethereum#23328)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-ogrady authored and i-norden committed Sep 10, 2021
1 parent 5c7dd0c commit efd0e0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/rawdb/accessors_indexes.go
Expand Up @@ -106,15 +106,15 @@ func ReadTransaction(db ethdb.Reader, hash common.Hash) (*types.Transaction, com
}
body := ReadBody(db, blockHash, *blockNumber)
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
}
for txIndex, tx := range body.Transactions {
if tx.Hash() == hash {
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
}

Expand All @@ -137,7 +137,7 @@ func ReadReceipt(db ethdb.Reader, hash common.Hash, config *params.ChainConfig)
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
}

Expand Down

0 comments on commit efd0e0c

Please sign in to comment.