diff --git a/api/accounts/accounts.go b/api/accounts/accounts.go index 2ef14ca87..a6d1df3ee 100644 --- a/api/accounts/accounts.go +++ b/api/accounts/accounts.go @@ -31,7 +31,7 @@ type Accounts struct { stater *state.Stater callGasLimit uint64 forkConfig thor.ForkConfig - bft bft.CommitLevel + bft bft.Committer } func New( @@ -39,7 +39,7 @@ func New( stater *state.Stater, callGasLimit uint64, forkConfig thor.ForkConfig, - bft bft.CommitLevel, + bft bft.Committer, ) *Accounts { return &Accounts{ repo, diff --git a/api/api.go b/api/api.go index 9f425f66a..c63573764 100644 --- a/api/api.go +++ b/api/api.go @@ -38,7 +38,7 @@ func New( stater *state.Stater, txPool *txpool.TxPool, logDB *logdb.LogDB, - bft bft.CommitLevel, + bft bft.Committer, nw node.Network, forkConfig thor.ForkConfig, allowedOrigins string, diff --git a/api/blocks/blocks.go b/api/blocks/blocks.go index c3183a4c5..bddb3ac12 100644 --- a/api/blocks/blocks.go +++ b/api/blocks/blocks.go @@ -19,10 +19,10 @@ import ( type Blocks struct { repo *chain.Repository - bft bft.CommitLevel + bft bft.Committer } -func New(repo *chain.Repository, bft bft.CommitLevel) *Blocks { +func New(repo *chain.Repository, bft bft.Committer) *Blocks { return &Blocks{ repo, bft, diff --git a/api/debug/debug.go b/api/debug/debug.go index f006be28b..bcdb32950 100644 --- a/api/debug/debug.go +++ b/api/debug/debug.go @@ -44,10 +44,10 @@ type Debug struct { forkConfig thor.ForkConfig callGasLimit uint64 allowCustomTracer bool - bft bft.CommitLevel + bft bft.Committer } -func New(repo *chain.Repository, stater *state.Stater, forkConfig thor.ForkConfig, callGaslimit uint64, allowCustomTracer bool, bft bft.CommitLevel) *Debug { +func New(repo *chain.Repository, stater *state.Stater, forkConfig thor.ForkConfig, callGaslimit uint64, allowCustomTracer bool, bft bft.Committer) *Debug { return &Debug{ repo, stater, diff --git a/api/utils/revisions.go b/api/utils/revisions.go index 86ad78371..61675aebe 100644 --- a/api/utils/revisions.go +++ b/api/utils/revisions.go @@ -72,7 +72,7 @@ func ParseRevision(revision string, allowNext bool) (*Revision, error) { // GetSummary returns the block summary for the given revision, // revision required to be a deterministic block other than "next". -func GetSummary(rev *Revision, repo *chain.Repository, bft bft.CommitLevel) (sum *chain.BlockSummary, err error) { +func GetSummary(rev *Revision, repo *chain.Repository, bft bft.Committer) (sum *chain.BlockSummary, err error) { var id thor.Bytes32 switch rev := rev.val.(type) { case thor.Bytes32: @@ -104,7 +104,7 @@ func GetSummary(rev *Revision, repo *chain.Repository, bft bft.CommitLevel) (sum // GetSummaryAndState returns the block summary and state for the given revision, // this function supports the "next" revision. -func GetSummaryAndState(rev *Revision, repo *chain.Repository, bft bft.CommitLevel, stater *state.Stater) (*chain.BlockSummary, *state.State, error) { +func GetSummaryAndState(rev *Revision, repo *chain.Repository, bft bft.Committer, stater *state.Stater) (*chain.BlockSummary, *state.State, error) { if rev.IsNext() { best := repo.BestBlockSummary() diff --git a/bft/engine.go b/bft/engine.go index faeca3acb..a89dc399b 100644 --- a/bft/engine.go +++ b/bft/engine.go @@ -26,7 +26,7 @@ const dataStoreName = "bft.engine" var finalizedKey = []byte("finalized") var justifiedKey = []byte("justified") -type CommitLevel interface { +type Committer interface { Finalized() thor.Bytes32 Justified() thor.Bytes32 }