Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetCurrentBP also return BP follower #229

Merged
merged 3 commits into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/cqld/cqld_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ func TestCQLD(t *testing.T) {
So(err, ShouldBeNil)
time.Sleep(15 * time.Second)

// set current bp to leader bp
rpc.SetCurrentBP(route.GetBPs()[0])

// The other peers should be waiting
var (
req = &types.FetchLastIrreversibleBlockReq{}
Expand Down
3 changes: 1 addition & 2 deletions rpc/rpcutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ func GetCurrentBP() (bpNodeID proto.NodeID, err error) {
ID: localNodeID,
Roles: []proto.ServerRole{
proto.Leader,
// only leader is capable of allocating database in current implementation
//proto.Follower,
proto.Follower,
},
Count: 1,
}
Expand Down