mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-30 00:23:46 +00:00
chore: add more info in err log
This commit is contained in:
parent
1e9efe7762
commit
0819e81eea
3 changed files with 9 additions and 5 deletions
|
|
@ -137,8 +137,7 @@ func startPortalRpcServer(config Config, conn discover.UDPConn, addr string) err
|
|||
Addr: addr,
|
||||
Handler: server,
|
||||
}
|
||||
httpServer.ListenAndServe()
|
||||
return nil
|
||||
return httpServer.ListenAndServe()
|
||||
}
|
||||
|
||||
func initDiscV5(config Config, conn discover.UDPConn) (*discover.UDPv5, *enode.LocalNode, error) {
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ func (p *PortalProtocol) pingInner(node *enode.Node) (*portalwire.Pong, error) {
|
|||
talkResp, err := p.DiscV5.TalkRequest(node, p.protocolId, talkRequestBytes)
|
||||
|
||||
if err != nil {
|
||||
p.Log.Error("ping error:", err)
|
||||
p.Log.Error("ping error:", "ip", node.IP().String(), "port", node.UDP(), "err", err)
|
||||
p.replaceNode(node)
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -439,7 +439,7 @@ func (p *PortalProtocol) findNodes(node *enode.Node, distances []uint) ([]*enode
|
|||
|
||||
talkResp, err := p.DiscV5.TalkRequest(node, p.protocolId, talkRequestBytes)
|
||||
if err != nil {
|
||||
p.Log.Error("failed to send find nodes request", "err", err)
|
||||
p.Log.Error("failed to send find nodes request", "ip", node.IP().String(), "port", node.UDP(), "err", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
@ -464,7 +464,7 @@ func (p *PortalProtocol) findContent(node *enode.Node, contentKey []byte) (byte,
|
|||
|
||||
talkResp, err := p.DiscV5.TalkRequest(node, p.protocolId, talkRequestBytes)
|
||||
if err != nil {
|
||||
p.Log.Error("failed to send find content request", "err", err)
|
||||
p.Log.Error("failed to send find content request", "ip", node.IP().String(), "port", node.UDP(), "err", err)
|
||||
return 0xff, nil, err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,11 @@ func TestVerifyPostMergePreCapellaHeader(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
require.True(t, uint64(len(acc.HistoricalRoots)) < uint64(configs.Mainnet.HISTORICAL_ROOTS_LIMIT))
|
||||
|
||||
root := acc.HistoricalRoots.HashTreeRoot(configs.Mainnet, tree.GetHashFn())
|
||||
hexutil.Encode(root[:])
|
||||
|
||||
require.Equal(t, hexutil.Encode(root[:]), "0x4df6b89755125d4f6c5575039a04e22301a5a49ee893c1d27e559e3eeab73da7")
|
||||
|
||||
file, err := os.ReadFile("./testdata/block_proofs_bellatrix/beacon_block_proof-15539558-cdf9ed89b0c43cda17398dc4da9cfc505e5ccd19f7c39e3b43474180f1051e01.yaml")
|
||||
require.NoError(t, err)
|
||||
proof := HistoricalRootsBlockProof{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue