diff --git a/cmd/cqld/cqld_test.go b/cmd/cqld/cqld_test.go index 7d3c267b6..bbadb0ae3 100644 --- a/cmd/cqld/cqld_test.go +++ b/cmd/cqld/cqld_test.go @@ -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{} diff --git a/rpc/rpcutil.go b/rpc/rpcutil.go index 147a32726..ede10f061 100644 --- a/rpc/rpcutil.go +++ b/rpc/rpcutil.go @@ -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, }