chore: log contentKey convert to contentId

This commit is contained in:
thinkAfCod 2024-03-07 12:00:04 +08:00
parent c9d6817008
commit 23104b78ec

View file

@ -93,6 +93,7 @@ const requestRetries = 4
func (h *HistoryNetwork) GetBlockHeader(blockHash []byte) (*types.Header, error) {
contentKey := newContentKey(BlockHeaderType, blockHash).encode()
contentId := h.portalProtocol.ToContentId(contentKey)
h.log.Trace("contentKey convert to contentId", "contentKey", hexutil.Encode(contentKey), "contentId", hexutil.Encode(contentId))
if !h.portalProtocol.InRange(contentId) {
return nil, ErrContentOutOfRange
}