diff --git a/orderer/consensus/smartbft/chain.go b/orderer/consensus/smartbft/chain.go index e61ff292195..4b913159169 100644 --- a/orderer/consensus/smartbft/chain.go +++ b/orderer/consensus/smartbft/chain.go @@ -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") } @@ -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 @@ -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 diff --git a/orderer/consensus/smartbft/configverifier_test.go b/orderer/consensus/smartbft/configverifier_test.go index 583edd4c918..93d0449b1f5 100644 --- a/orderer/consensus/smartbft/configverifier_test.go +++ b/orderer/consensus/smartbft/configverifier_test.go @@ -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) @@ -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, diff --git a/orderer/consensus/smartbft/egress.go b/orderer/consensus/smartbft/egress.go index 80c3f4e3cd4..38fb5d28afc 100644 --- a/orderer/consensus/smartbft/egress.go +++ b/orderer/consensus/smartbft/egress.go @@ -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) } @@ -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), }