diff --git a/go.mod b/go.mod index 4407ba9eb..e4cfcfa48 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/holiman/uint256 v1.3.1 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/mr-tron/base58 v1.2.0 - github.com/nspcc-dev/dbft v0.3.0 + github.com/nspcc-dev/dbft v0.3.1 github.com/nspcc-dev/go-ordered-json v0.0.0-20240830112754-291b000d1f3b github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20240727093519-1a48f1ce43ec github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12 diff --git a/go.sum b/go.sum index 1b79a8a49..82ccf1ed2 100644 --- a/go.sum +++ b/go.sum @@ -136,8 +136,8 @@ 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/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nspcc-dev/dbft v0.3.0 h1:P9dFQje43sabA6w89l1OqGe1BvnO7DdHcu27w6mfnOE= -github.com/nspcc-dev/dbft v0.3.0/go.mod h1:oFE6paSC/yfFh9mcNU6MheMGOYXK9+sPiRk3YMoz49o= +github.com/nspcc-dev/dbft v0.3.1 h1:3qoc65CVJMtdL/627JZH+1Jz839LmdsVN52L4mlP5z8= +github.com/nspcc-dev/dbft v0.3.1/go.mod h1:BNvJkPKTE28r+qRaAk2C3VoL2J9qzox3fvEeJbh7EWE= github.com/nspcc-dev/go-ordered-json v0.0.0-20240830112754-291b000d1f3b h1:DRG4cRqIOmI/nUPggMgR92Jxt63Lxsuz40m5QpdvYXI= github.com/nspcc-dev/go-ordered-json v0.0.0-20240830112754-291b000d1f3b/go.mod h1:d3cUseu4Asxfo9/QA/w4TtGjM0AbC9ynyab+PfH+Bso= github.com/nspcc-dev/hrw/v2 v2.0.1 h1:CxYUkBeJvNfMEn2lHhrV6FjY8pZPceSxXUtMVq0BUOU= diff --git a/pkg/consensus/consensus.go b/pkg/consensus/consensus.go index 4a7d80e09..d4763d157 100644 --- a/pkg/consensus/consensus.go +++ b/pkg/consensus/consensus.go @@ -202,6 +202,7 @@ func NewService(cfg Config) (Service, error) { dbft.WithNewRecoveryMessage[util.Uint256](srv.newRecoveryMessage), dbft.WithVerifyPrepareRequest[util.Uint256](srv.verifyRequest), dbft.WithVerifyPrepareResponse[util.Uint256](srv.verifyResponse), + dbft.WithVerifyCommit[util.Uint256](srv.verifyCommit), ) if err != nil { @@ -614,7 +615,11 @@ func (s *service) verifyResponse(p dbft.ConsensusPayload[util.Uint256]) error { return nil } -func (s *service) processBlock(b dbft.Block[util.Uint256]) { +func (s *service) verifyCommit(p dbft.ConsensusPayload[util.Uint256]) error { + return nil +} + +func (s *service) processBlock(b dbft.Block[util.Uint256]) error { bb := &b.(*neoBlock).Block bb.Script = *(s.getBlockWitness(bb)) @@ -626,6 +631,7 @@ func (s *service) processBlock(b dbft.Block[util.Uint256]) { } } s.postBlock(bb) + return nil } func (s *service) postBlock(b *coreb.Block) {