forked from TrueCloudLab/neoneo-go
consensus: use better dbFT
Fetch fresh dbft version with minor adjustments. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
708b439f4a
commit
beee2605a3
3 changed files with 6 additions and 6 deletions
2
go.mod
2
go.mod
|
@ -14,7 +14,7 @@ require (
|
||||||
github.com/holiman/uint256 v1.2.4
|
github.com/holiman/uint256 v1.2.4
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||||
github.com/mr-tron/base58 v1.2.0
|
github.com/mr-tron/base58 v1.2.0
|
||||||
github.com/nspcc-dev/dbft v0.1.1-0.20240311071455-88b2f18461e5
|
github.com/nspcc-dev/dbft v0.1.1-0.20240321205542-332ff86ba4c6
|
||||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2
|
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2
|
||||||
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231127165613-b35f351f0ba0
|
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20231127165613-b35f351f0ba0
|
||||||
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11
|
github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.11
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -88,8 +88,8 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky
|
||||||
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
|
github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU=
|
||||||
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
||||||
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||||
github.com/nspcc-dev/dbft v0.1.1-0.20240311071455-88b2f18461e5 h1:XK88zeGFqO/43ZTwHbNSisgxuvExYp8DB/TMbjfw1yk=
|
github.com/nspcc-dev/dbft v0.1.1-0.20240321205542-332ff86ba4c6 h1:6rpKY0AvXQpL2ZpLTxGDJAM54ak6ziXghi4uLGUrSdg=
|
||||||
github.com/nspcc-dev/dbft v0.1.1-0.20240311071455-88b2f18461e5/go.mod h1:oFE6paSC/yfFh9mcNU6MheMGOYXK9+sPiRk3YMoz49o=
|
github.com/nspcc-dev/dbft v0.1.1-0.20240321205542-332ff86ba4c6/go.mod h1:oFE6paSC/yfFh9mcNU6MheMGOYXK9+sPiRk3YMoz49o=
|
||||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 h1:mD9hU3v+zJcnHAVmHnZKt3I++tvn30gBj2rP2PocZMk=
|
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2 h1:mD9hU3v+zJcnHAVmHnZKt3I++tvn30gBj2rP2PocZMk=
|
||||||
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2/go.mod h1:U5VfmPNM88P4RORFb6KSUVBdJBDhlqggJZYGXGPxOcc=
|
github.com/nspcc-dev/go-ordered-json v0.0.0-20240301084351-0246b013f8b2/go.mod h1:U5VfmPNM88P4RORFb6KSUVBdJBDhlqggJZYGXGPxOcc=
|
||||||
github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y=
|
github.com/nspcc-dev/hrw v1.0.9 h1:17VcAuTtrstmFppBjfRiia4K2wA/ukXZhLFS8Y8rz5Y=
|
||||||
|
|
|
@ -179,7 +179,7 @@ func NewService(cfg Config) (Service, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
srv.dbft = dbft.New[util.Uint256](
|
srv.dbft, err = dbft.New[util.Uint256](
|
||||||
dbft.WithTimer[util.Uint256](timer.New()),
|
dbft.WithTimer[util.Uint256](timer.New()),
|
||||||
dbft.WithLogger[util.Uint256](srv.log),
|
dbft.WithLogger[util.Uint256](srv.log),
|
||||||
dbft.WithSecondsPerBlock[util.Uint256](cfg.TimePerBlock),
|
dbft.WithSecondsPerBlock[util.Uint256](cfg.TimePerBlock),
|
||||||
|
@ -209,8 +209,8 @@ func NewService(cfg Config) (Service, error) {
|
||||||
dbft.WithVerifyPrepareResponse[util.Uint256](srv.verifyResponse),
|
dbft.WithVerifyPrepareResponse[util.Uint256](srv.verifyResponse),
|
||||||
)
|
)
|
||||||
|
|
||||||
if srv.dbft == nil {
|
if err != nil {
|
||||||
return nil, errors.New("can't initialize dBFT")
|
return nil, fmt.Errorf("can't initialize dBFT: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return srv, nil
|
return srv, nil
|
||||||
|
|
Loading…
Reference in a new issue