func (s *ShardSyncManager) ProposalAnnounced(shardProposals []uint64, startState chainhash.Hash, startSlot uint64) {
	// worst case, we propose an empty block
	oldSlotProposals := s.slotProposals
	newProposals := make(map[uint64]*SlotProposalManager)

	for _, slot := range shardProposals {
		root := startState
		stateSlot := startSlot
		if manager, found := oldSlotProposals[slot]; found {
			root = manager.bestProposal.TransactionPackage.StartRoot
			stateSlot = manager.bestProposal.startSlot
		}

		newProposals[slot] = NewSlotProposalManager(slot, root, stateSlot, s)

		currentSlot := slot
		proposalManager, found := oldSlotProposals[currentSlot]
		for !found && currentSlot > 0 {
			currentSlot--
			proposalManager, found = oldSlotProposals[currentSlot]
		}

		if found {
			newProposals[slot].bestProposal = proposalManager.bestProposal
		}
	}

	s.slotProposals = newProposals
}
// ProposalAnnounced registers a slot to be proposed.
ProposalAnnounced registers a slot to be proposed.
// ProposalAnnounced registers a slot to be proposed .
func (s *ShardSyncManager) ProposalAnnounced(shardProposals []uint64, startState chainhash.Hash, startSlot uint64) {
	oldSlotProposals := s.slotProposals
	newProposals := make(map[uint64]*SlotProposalManager)
	for _, slot := range shardProposals {
		root := startState
		stateSlot := startSlot
		if manager, found := oldSlotProposals[slot]; found {
			root = manager.bestProposal.TransactionPackage.StartRoot
			stateSlot = manager.bestProposal.startSlot
		}
		newProposals[slot] = NewSlotProposalManager(slot, root, stateSlot, s)
		currentSlot := slot
		proposalManager, found := oldSlotProposals[currentSlot]
		for !found && currentSlot > 0 {
			currentSlot--
			proposalManager, found = oldSlotProposals[currentSlot]
		}
		if found {
			newProposals[slot].bestProposal = proposalManager.bestProposal
		}
	}
	s.slotProposals = newProposals
}
func ( s * ShardSyncManager ) ProposalAnnounced ( shardProposals [ ] uint64 , startState chainhash . Hash , startSlot uint64 ) { oldSlotProposals := s . slotProposals newProposals := make ( map [ uint64 ] * SlotProposalManager ) for _ , slot := range shardProposals { root := startState stateSlot := startSlot if manager , found := oldSlotProposals [ slot ] ; found { root = manager . bestProposal . TransactionPackage . StartRoot stateSlot = manager . bestProposal . startSlot } newProposals [ slot ] = NewSlotProposalManager ( slot , root , stateSlot , s ) currentSlot := slot proposalManager , found := oldSlotProposals [ currentSlot ] for ! found && currentSlot > 0 { currentSlot -- proposalManager , found = oldSlotProposals [ currentSlot ] } if found { newProposals [ slot ] . bestProposal = proposalManager . bestProposal } } s . slotProposals = newProposals }
ProposalAnnounced registers a slot to be proposed.
ProposalAnnounced registers a slot to be proposed .
// worst case, we propose an empty block