Address moar comments
This commit is contained in:
+1
-1
@@ -121,7 +121,7 @@ const (
|
||||
SettlePaymentChannelsKey
|
||||
RunPeerTaggerKey
|
||||
SetupFallbackBlockstoresKey
|
||||
RPCServer
|
||||
GoRPCServer
|
||||
|
||||
SetApiEndpointKey
|
||||
|
||||
|
||||
@@ -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
@@ -286,7 +286,7 @@ var (
|
||||
DefaultNetworkTimeout = 100 * time.Second
|
||||
DefaultCommitRetryDelay = 200 * time.Millisecond
|
||||
DefaultBackupsRotate = 6
|
||||
DefaultDatastoreNamespace = "/r" // from "/raft"
|
||||
DefaultDatastoreNamespace = "/raft"
|
||||
)
|
||||
|
||||
func DefaultClusterRaftConfig() *ClusterRaftConfig {
|
||||
|
||||
@@ -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`,
|
||||
},
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user