diff options
Diffstat (limited to 'core/lattice.go')
-rw-r--r-- | core/lattice.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/lattice.go b/core/lattice.go index 530fbab..27d38d8 100644 --- a/core/lattice.go +++ b/core/lattice.go @@ -102,6 +102,15 @@ func (s *Lattice) SanityCheck(b *types.Block) (err error) { err = ErrIncorrectHash return } + for i := range b.Acks { + if i == 0 { + continue + } + if !b.Acks[i-1].Less(b.Acks[i]) { + err = ErrAcksNotSorted + return + } + } // Check the signer. pubKey, err := crypto.SigToPub(b.Hash, b.Signature) if err != nil { |