Skip to content

Commit

Permalink
remove unused params (#5094)
Browse files Browse the repository at this point in the history
Signed-off-by: Hagar Meir <[email protected]>
  • Loading branch information
HagarMeir authored Jan 8, 2025
1 parent faa0a5f commit 97853f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions orderer/consensus/smartbft/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (c *BFTChain) pruneBadRequests() {
})
}

func (c *BFTChain) submit(env *cb.Envelope, configSeq uint64) error {
func (c *BFTChain) submit(env *cb.Envelope) error {
if env == nil {
return errors.New("failed to marshal request envelope: proto: Marshal called with nil")
}
Expand Down Expand Up @@ -334,7 +334,7 @@ func (c *BFTChain) Order(env *cb.Envelope, configSeq uint64) error {
}
}

return c.submit(env, configSeq)
return c.submit(env)
}

// Configure accepts a message which reconfigures the channel and will
Expand All @@ -353,10 +353,10 @@ func (c *BFTChain) Configure(config *cb.Envelope, configSeq uint64) error {
if configEnv, _, err := c.support.ProcessConfigMsg(config); err != nil {
return errors.Errorf("bad normal message: %s", err)
} else {
return c.submit(configEnv, configSeq)
return c.submit(configEnv)
}
}
return c.submit(config, configSeq)
return c.submit(config)
}

// Deliver delivers proposal, writes block with transactions and metadata
Expand Down
4 changes: 2 additions & 2 deletions orderer/consensus/smartbft/configverifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

func TestValidateConfig(t *testing.T) {
configBlockEnvelope := makeConfigTx("mychannel", 1)
configBlockEnvelope := makeConfigTx("mychannel")
configBlockEnvelopePayload := protoutil.UnmarshalPayloadOrPanic(configBlockEnvelope.Payload)
configEnvelope := &cb.ConfigEnvelope{}
err := proto.Unmarshal(configBlockEnvelopePayload.Data, configEnvelope)
Expand Down Expand Up @@ -268,7 +268,7 @@ func TestValidateConfig(t *testing.T) {
}
}

func makeConfigTx(chainID string, i int) *cb.Envelope {
func makeConfigTx(chainID string) *cb.Envelope {
gConf := genesisconfig.Load(genesisconfig.SampleAppChannelSmartBftProfile, configtest.GetDevConfigDir())
gConf.Orderer.Capabilities = map[string]bool{
capabilities.OrdererV2_0: true,
Expand Down
4 changes: 2 additions & 2 deletions orderer/consensus/smartbft/egress.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (e *Egress) Nodes() []uint64 {

// SendConsensus sends the BFT message to the cluster
func (e *Egress) SendConsensus(targetID uint64, m *protos.Message) {
err := e.RPC.SendConsensus(targetID, bftMsgToClusterMsg(m, e.Channel))
err := e.RPC.SendConsensus(targetID, bftMsgToClusterMsg(m))
if err != nil {
e.Logger.Warnf("Failed sending to %d: %v", targetID, err)
}
Expand All @@ -85,7 +85,7 @@ func (e *Egress) SendTransaction(targetID uint64, request []byte) {
e.RPC.SendSubmit(targetID, msg, report)
}

func bftMsgToClusterMsg(message *protos.Message, channel string) *ab.ConsensusRequest {
func bftMsgToClusterMsg(message *protos.Message) *ab.ConsensusRequest {
return &ab.ConsensusRequest{
Payload: protoutil.MarshalOrPanic(message),
}
Expand Down

0 comments on commit 97853f3

Please sign in to comment.