Skip to content

Commit 1230e0f

Browse files
author
Jason Yellick
committed
Move simplebft to orderer and fix proto compile
Proto compilation was broken for sbft. In order to fix this, the simplebft.proto needed to be under the same proto root as the config.proto and consensus.proto from the sbft package. This seemed like an opportune time to move the simplebft code out of the legacy consensus dir and into orderer dir. Change-Id: Ie84dfaede6ebd5a2cffdcd021bf1d2f1966979f2 Signed-off-by: Jason Yellick <[email protected]>
1 parent 1950782 commit 1230e0f

35 files changed

+206
-128
lines changed

orderer/sbft/.protoroot

Whitespace-only changes.

orderer/sbft/backend/backend.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ import (
3939
"encoding/asn1"
4040

4141
"github.com/golang/protobuf/proto"
42-
s "github.com/hyperledger/fabric/consensus/simplebft"
4342
"github.com/hyperledger/fabric/orderer/rawledger"
4443
"github.com/hyperledger/fabric/orderer/sbft/connection"
4544
"github.com/hyperledger/fabric/orderer/sbft/persist"
45+
s "github.com/hyperledger/fabric/orderer/sbft/simplebft"
4646
cb "github.com/hyperledger/fabric/protos/common"
4747
ab "github.com/hyperledger/fabric/protos/orderer"
4848
"github.com/op/go-logging"

orderer/sbft/backend/consensus.pb.go

+39-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

orderer/sbft/backend/consensus.proto

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ syntax = "proto3";
22

33
package backend;
44

5-
import "github.com/hyperledger/fabric/consensus/simplebft/simplebft.proto";
5+
option go_package = "github.com/hyperledger/fabric/orderer/sbft/backend";
6+
7+
import "simplebft/simplebft.proto";
68

79
service consensus {
8-
rpc consensus(handshake) returns (stream simplebft.msg) {}
10+
rpc consensus(handshake) returns (stream simplebft.Msg) {}
911
}
1012

1113
message handshake {

orderer/sbft/backend/events.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package backend
1818

1919
import (
20-
s "github.com/hyperledger/fabric/consensus/simplebft"
20+
s "github.com/hyperledger/fabric/orderer/sbft/simplebft"
2121
)
2222

2323
type Timer struct {

orderer/sbft/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package main
17+
package sbft
1818

1919
import (
2020
"encoding/json"

orderer/sbft/config.pb.go

+52-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

orderer/sbft/config.proto

+6-4
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,19 @@ limitations under the License.
1616

1717
syntax = "proto3";
1818

19-
package main;
19+
option go_package = "github.com/hyperledger/fabric/orderer/sbft";
2020

21-
import "github.com/hyperledger/fabric/consensus/simplebft/simplebft.proto";
21+
package sbft;
22+
23+
import "simplebft/simplebft.proto";
2224

2325
message consensus_config {
24-
simplebft.config consensus = 1;
26+
simplebft.Config consensus = 1;
2527
map<string, bytes> peers = 2;
2628
};
2729

2830
message json_config {
29-
simplebft.config consensus = 1;
31+
simplebft.Config consensus = 1;
3032
repeated peer peers = 2;
3133
};
3234

orderer/sbft/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package main
17+
package sbft
1818

1919
import (
2020
"flag"
@@ -23,12 +23,12 @@ import (
2323
_ "net/http/pprof"
2424
"os"
2525

26-
pb "github.com/hyperledger/fabric/consensus/simplebft"
2726
"github.com/hyperledger/fabric/orderer/common/bootstrap/static"
2827
"github.com/hyperledger/fabric/orderer/rawledger/fileledger"
2928
"github.com/hyperledger/fabric/orderer/sbft/backend"
3029
"github.com/hyperledger/fabric/orderer/sbft/connection"
3130
"github.com/hyperledger/fabric/orderer/sbft/persist"
31+
pb "github.com/hyperledger/fabric/orderer/sbft/simplebft"
3232
ab "github.com/hyperledger/fabric/protos/orderer"
3333
"github.com/op/go-logging"
3434
"google.golang.org/grpc"

orderer/sbft/sbft_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package main
17+
package sbft
1818

1919
import (
2020
"fmt"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)