Merge pull request #1706 from nspcc-dev/consensus-compatibility

Consensus compatibility
This commit is contained in:
Roman Khimov 2021-02-04 18:11:26 +03:00 committed by GitHub
commit 07cabb1d00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -41,7 +41,7 @@ const defaultTimePerBlock = 15 * time.Second
const nsInMs = 1000000
// Category is message category for extensible payloads.
const Category = "Consensus"
const Category = "dBFT"
// Service represents consensus instance.
type Service interface {

View file

@ -121,6 +121,7 @@ func (e *Extensible) updateHashes(b []byte) {
// updateSignedPart updates serialized message if needed.
func (e *Extensible) updateSignedPart() {
w := io.NewBufBinWriter()
w.WriteU32LE(uint32(e.Network))
e.encodeBinaryUnsigned(w.BinWriter)
e.signedpart = w.Bytes()
}