Address moar comments

This commit is contained in:
Shrenuj Bansal
2022-09-22 16:27:15 -04:00
parent 1fe4aa3467
commit 7470549199
13 changed files with 19 additions and 139 deletions
+1 -1
View File
@@ -121,7 +121,7 @@ const (
SettlePaymentChannelsKey
RunPeerTaggerKey
SetupFallbackBlockstoresKey
RPCServer
GoRPCServer
SetApiEndpointKey
+2 -2
View File
@@ -244,9 +244,9 @@ func ConfigFullNode(c interface{}) Option {
Override(new(*gorpc.Client), modules.NewRPCClient),
Override(new(*consensus.Consensus), consensus2.NewConsensusWithRPCClient(false)),
Override(new(*messagesigner.MessageSignerConsensus), messagesigner.NewMessageSignerConsensus),
Override(new(messagesigner.MsgSigner), func(ms *messagesigner.MessageSignerConsensus) *messagesigner.MessageSignerConsensus { return ms }),
Override(new(messagesigner.MsgSigner), From(new(*messagesigner.MessageSignerConsensus))),
Override(new(*modules.RPCHandler), modules.NewRPCHandler),
Override(RPCServer, modules.NewRPCServer),
Override(GoRPCServer, modules.NewRPCServer),
),
)
}
+1 -1
View File
@@ -286,7 +286,7 @@ var (
DefaultNetworkTimeout = 100 * time.Second
DefaultCommitRetryDelay = 200 * time.Millisecond
DefaultBackupsRotate = 6
DefaultDatastoreNamespace = "/r" // from "/raft"
DefaultDatastoreNamespace = "/raft"
)
func DefaultClusterRaftConfig() *ClusterRaftConfig {
+3 -3
View File
@@ -146,14 +146,14 @@ initialized or when starting in staging mode.`,
},
{
Num: "WaitForLeaderTimeout",
Type: "time.Duration",
Type: "Duration",
Comment: `LeaderTimeout specifies how long to wait for a leader before
failing an operation.`,
},
{
Num: "NetworkTimeout",
Type: "time.Duration",
Type: "Duration",
Comment: `NetworkTimeout specifies how long before a Raft network
operation is timed out`,
@@ -167,7 +167,7 @@ we give up.`,
},
{
Num: "CommitRetryDelay",
Type: "time.Duration",
Type: "Duration",
Comment: `How long to wait between retries`,
},
+1 -1
View File
@@ -295,5 +295,5 @@ func (a *MpoolAPI) GetRaftState(ctx context.Context) (consensus.State, error) {
}
func (a *MpoolAPI) RaftLeader(ctx context.Context) (peer.ID, error) {
return a.MessageSigner.RaftLeader(ctx)
return a.MessageSigner.Leader(ctx)
}
-5
View File
@@ -19,11 +19,6 @@ type RPCHandler struct {
cons *consensus.Consensus
}
//type ConsensusRPCAPI struct {
// cons *consensus.Consensus
// rpcHandler *RPCHandler
//}
func NewRPCHandler(mpoolAPI full.MpoolAPI, cons *consensus.Consensus) *RPCHandler {
return &RPCHandler{mpoolAPI, cons}
}