WIP: Raft consensus for lotus nodes in a cluster

This commit is contained in:
Shrenuj Bansal
2022-09-12 16:10:15 -04:00
parent 2532300156
commit 8f1b1bb1ff
26 changed files with 2341 additions and 19 deletions
+5
View File
@@ -5,6 +5,7 @@ import (
"time"
logging "github.com/ipfs/go-log/v2"
consensus "github.com/libp2p/go-libp2p-consensus"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/filecoin-project/lotus/api"
@@ -117,4 +118,8 @@ func (n *FullNodeAPI) NodeStatus(ctx context.Context, inclChainStatus bool) (sta
return status, nil
}
func (n *FullNodeAPI) RaftState(ctx context.Context) (consensus.State, error) {
return n.MpoolAPI.GetRaftState(ctx)
}
var _ api.FullNode = &FullNodeAPI{}