Skip to content

Commit f3cc92a

Browse files
committed
chore: linter
1 parent 5dc0034 commit f3cc92a

9 files changed

Lines changed: 8 additions & 29 deletions

File tree

consensus/propagation/commitment.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ func (blockProp *Reactor) recoverPartsFromMempool(cb *proptypes.CompactBlock) {
229229
// a proposer
230230
blockProp.broadcastHaves(&haves, blockProp.self, int(partSet.Total()))
231231
}
232-
233-
return
234232
}
235233

236234
// broadcastProposal gossips the provided proposal to all peers. This should

consensus/propagation/commitment_state.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import (
99
)
1010

1111
type proposalData struct {
12-
compactBlock *proptypes.CompactBlock
13-
block *proptypes.CombinedPartSet
14-
maxRequests *bits.BitArray
15-
catchup bool
16-
decomissioned bool
12+
compactBlock *proptypes.CompactBlock
13+
block *proptypes.CombinedPartSet
14+
maxRequests *bits.BitArray
15+
catchup bool
1716
}
1817

1918
type ProposalCache struct {

consensus/propagation/reactor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ func TestPropagationSmokeTest(t *testing.T) {
389389
})
390390

391391
for i := int64(1); i < 5; i++ {
392-
prop, ps, block, metaData := createTestProposal(sm, int64(i), 2, 1000000)
392+
prop, ps, block, metaData := createTestProposal(sm, i, 2, 1000000)
393393

394394
// predistribute portions of the block
395395
for _, tx := range block.Data.Txs {
@@ -424,7 +424,7 @@ func TestPropagationSmokeTest(t *testing.T) {
424424
}
425425

426426
for _, r := range reactors {
427-
r.Prune(int64(i))
427+
r.Prune(i)
428428
}
429429
}
430430

consensus/state.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2533,15 +2533,6 @@ func (cs *State) syncData() {
25332533
completeProp := cs.isProposalComplete()
25342534
cs.mtx.RUnlock()
25352535

2536-
schema.WriteNote(
2537-
cs.traceClient,
2538-
h,
2539-
r,
2540-
"syncData udpate",
2541-
"%d %d %v",
2542-
h, r, completeProp,
2543-
)
2544-
25452536
if completeProp {
25462537
continue
25472538
}

mempool/cat/pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ func (txmp *TxPool) ReapMaxBytesMaxGas(maxBytes, maxGas int64) []*types.CachedTx
456456
// The result may have fewer than max elements (possibly zero) if the mempool
457457
// does not have that many transactions available.
458458
func (txmp *TxPool) ReapMaxTxs(max int) []*types.CachedTx {
459-
var keep []*types.CachedTx
459+
var keep []*types.CachedTx //nolint:prealloc
460460

461461
for _, w := range txmp.allEntriesSorted() {
462462
if max >= 0 && len(keep) >= max {

mempool/tx.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ type TxInfo struct {
1414

1515
// SenderP2PID is the actual p2p.ID of the sender, used e.g. for logging.
1616
SenderP2PID p2p.ID
17-
18-
IsRPC bool
1917
}

mempool/v1/mempool.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ func (txmp *TxMempool) CheckTx(tx types.Tx, cb func(*abci.Response), txInfo memp
223223
txmp.metrics.AlreadySeenTxs.Add(1)
224224
w := elt.Value.(*WrappedTx)
225225
w.SetPeer(txInfo.SenderID)
226-
w.isRpc = txInfo.IsRPC
227226
}
228227
return 0, mempool.ErrTxInCache
229228
}

mempool/v1/reactor.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (memR *Reactor) ReceiveEnvelope(e p2p.Envelope) {
185185
memR.Logger.Error("received tmpty txs from peer", "src", e.Src)
186186
return
187187
}
188-
txInfo := mempool.TxInfo{SenderID: memR.ids.GetForPeer(e.Src), IsRPC: false}
188+
txInfo := mempool.TxInfo{SenderID: memR.ids.GetForPeer(e.Src)}
189189
if e.Src != nil {
190190
txInfo.SenderP2PID = e.Src.ID()
191191
}
@@ -286,10 +286,6 @@ func (memR *Reactor) broadcastTxRoutine(peer p2p.Peer) {
286286
continue
287287
}
288288

289-
if !memTx.isRpc {
290-
continue
291-
}
292-
293289
// NOTE: Transaction batching was disabled due to
294290
// https://github.com/tendermint/tendermint/issues/5796
295291
if !memTx.HasPeer(peerID) {

mempool/v1/tx.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ type WrappedTx struct {
1919
priority int64 // app: priority value for this transaction
2020
sender string // app: assigned sender label
2121
peers map[uint16]bool // peer IDs who have sent us this transaction
22-
23-
isRpc bool
2422
}
2523

2624
// Size reports the size of the raw transaction in bytes.

0 commit comments

Comments
 (0)