def initialize_locksets(self):
        log.debug('initializing locksets')
        # sign genesis
        v = self.sign(VoteBlock(0, 0, self.chainservice.chain.genesis.hash))
        self.add_vote(v)

        # add initial lockset
        head_proposal = self.load_proposal(self.head.hash)
        # assert head_proposal
        if head_proposal:
            assert head_proposal.blockhash == self.head.hash
            for v in head_proposal.signing_lockset:
                self.add_vote(v)  # head - 1 , height -2
            assert self.heights[1 - self.head.header.number].has_quorum
        last_committing_lockset = self.load_last_committing_lockset()
        if last_committing_lockset:
            assert last_committing_lockset.has_quorum == self.head.hash
            for v in last_committing_lockset.votes:
                self.add_vote(v)  # head  , height - 1
            assert self.heights[self.head.header.number].has_quorum
        else:
            assert self.head.header.number == 0
        assert self.highest_committing_lockset
        assert self.last_committing_lockset
        assert self.last_valid_lockset

    # persist proposals and last committing lockset
dataset/ETHPy150Open HydraChain/hydrachain/hydrachain/consensus/manager.py/ConsensusManager.initialize_locksets/swapped operands of `-`