Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3249 +/- ##
==========================================
+ Coverage 59.26% 59.28% +0.01%
==========================================
Files 2070 2072 +2
Lines 169788 169844 +56
==========================================
+ Hits 100631 100695 +64
+ Misses 60358 60350 -8
Partials 8799 8799
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| next, err := r.evpool.WaitEvidenceFront(ctx) | ||
| if err != nil { | ||
| panic(fmt.Errorf("failed to convert evidence: %w", err)) | ||
| return |
There was a problem hiding this comment.
nit: Should we return error some day?
| ev := next.Value() | ||
| evProto, err := types.EvidenceToProto(ev) | ||
| if err != nil { | ||
| panic(fmt.Errorf("failed to convert evidence: %w", err)) |
There was a problem hiding this comment.
nit: add a comment what this panic will do? (I guess it will close our Gossip to this peer?)
|
|
||
| // MaxLength is the max allowed number of elements a linked list is | ||
| // allowed to contain. | ||
| // If more elements are pushed to the list it will panic. |
There was a problem hiding this comment.
Should you move this comment as well?
| func (e *CElement) detachNext() { | ||
| func (e *CElement[T]) Value() T { | ||
| e.mtx.RLock() | ||
| value := e.value |
There was a problem hiding this comment.
value in e never changes right? Do we need this lock?
| // Deprecated and should be removed in 0.37 | ||
| func (env *Environment) BroadcastTxAsync(ctx context.Context, req *coretypes.RequestBroadcastTx) (*coretypes.ResultBroadcastTx, error) { | ||
| go func() { _ = env.Mempool.CheckTx(ctx, req.Tx, nil, mempool.TxInfo{}) }() | ||
| go func() { _, _ = env.Mempool.CheckTx(ctx, req.Tx, mempool.TxInfo{}) }() |
There was a problem hiding this comment.
This ctx is the request context right? Will it be cancelled once the request is done? Then we run CheckTX in a canclled context?
| peerMempoolID := r.ids.GetForPeer(peerID) | ||
| // TODO: this function does not call any external code, so panics should not be expected. | ||
| defer func() { | ||
| if e := recover(); e != nil { |
There was a problem hiding this comment.
Do we not need this recover() any more?
Made clist generic. Also