// SetHeight sets the Height field's value.
961632
func (s *DetectedProperties) SetHeight(v int64) *DetectedProperties {
	s.Height = &v
	return s
}
1079857
func (s *SizeType) ScaleToHeight(height float64) SizeType {
	width := s.Wd * height / s.Ht
	return SizeType{width, height}
}
502114
func (b *BlockChain) BlockHashByHeight(blockHeight int32) (*chainhash.Hash, error) {
	node := b.bestChain.NodeByHeight(blockHeight)
	if node == nil {
		str := fmt.Sprintf("no block at height %d exists", blockHeight)
		return nil, errNotInMainChain(str)

	}

	return &node.hash, nil
}
914090
func (s *Status) SetHeight(height uint32) {
	s.Lock()
	defer s.Unlock()
	s.ready = height == s.dbHeight
	s.height = height
}
1098612
func (cs *ConsensusState) updateHeight(height int64) {
	cs.metrics.Height.Set(float64(height))
	cs.Height = height
}
727745
func (c *BitcoindClient) GetBlockHeight(hash *chainhash.Hash) (int32, error) {
	header, err := c.chainConn.client.GetBlockHeaderVerbose(hash)
	if err != nil {
		return 0, err
	}

	return header.Height, nil
}
960928
func (b *BlockChain) BlockByHeight(blockHeight int32) (*btcutil.Block, error) {
	// Lookup the block height in the best chain.
	node := b.bestChain.NodeByHeight(blockHeight)
	if node == nil {
		str := fmt.Sprintf("no block at height %d exists", blockHeight)
		return nil, errNotInMainChain(str)
	}

	// Load the block from the database and return it.
	var block *btcutil.Block
	err := b.db.View(func(dbTx database.Tx) error {
		var err error
		block, err = dbFetchBlockByNode(dbTx, node)
		return err
	})
	return block, err
}
1087300
func (s *CancelHandshakeInput) SetHandshakeId(v string) *CancelHandshakeInput {
	s.HandshakeId = &v
	return s
}
385816
func (s *ChainService) rollBackToHeight(height uint32) (*waddrmgr.BlockStamp, error) {
	header, headerHeight, err := s.BlockHeaders.ChainTip()
	if err != nil {
		return nil, err
	}
	bs := &waddrmgr.BlockStamp{
		Height: int32(headerHeight),
		Hash:   header.BlockHash(),
	}

	_, regHeight, err := s.RegFilterHeaders.ChainTip()
	if err != nil {
		return nil, err
	}

	for uint32(bs.Height) > height {
		header, _, err := s.BlockHeaders.FetchHeader(&bs.Hash)
		if err != nil {
			return nil, err
		}

		newTip := &header.PrevBlock

		// Only roll back filter headers if they've caught up this far.
		if uint32(bs.Height) <= regHeight {
			newFilterTip, err := s.RegFilterHeaders.RollbackLastBlock(newTip)
			if err != nil {
				return nil, err
			}
			regHeight = uint32(newFilterTip.Height)
		}

		bs, err = s.BlockHeaders.RollbackLastBlock()
		if err != nil {
			return nil, err
		}

		// Notifications are asynchronous, so we include the previous
		// header in the disconnected notification in case we're rolling
		// back farther and the notification subscriber needs it but
		// can't read it before it's deleted from the store.
		prevHeader, _, err := s.BlockHeaders.FetchHeader(newTip)
		if err != nil {
			return nil, err
		}

		// Now we send the block disconnected notifications.
		s.blockManager.onBlockDisconnected(
			*header, headerHeight, *prevHeader,
		)
	}
	return bs, nil
}
1323533
func (t *Table) SetHeader(keys []string) {
	t.colSize = len(keys)
	for i, v := range keys {
		lines := t.parseDimension(v, i, headerRowIdx)
		t.headers = append(t.headers, lines)
	}
}
523301
func (rl *ramLedger) Height() uint64 {
	rl.lock.RLock()
	defer rl.lock.RUnlock()
	return rl.newest.block.Header.Number + 1
}
180235
func Height() int {
	ws, err := getWinsize()
	if err != nil {
		return -1
	}
	return int(ws.Row)
}
108519
func (g *BlockGate) WaitForHeight(height int64) chan chainhash.Hash {
	g.mtx.Lock()
	defer g.mtx.Unlock()

	if height < 0 {
		return nil
	}

	waitChan := make(chan chainhash.Hash, 1)
	// Queue for future send.
	g.heightWaiters[height] = append(g.heightWaiters[height], waitChan)

	// If the block is already cached, send now.
	if hash, ok := g.hashAtHeight[height]; ok {
		g.signalHeight(height, hash)
	} else if height <= g.fetchToHeight {
		if _, err := g.updateToBlock(height); err != nil {
			fmt.Printf("Failed to updateToBlock: %v", err)
			return nil
		}
	} else if height < g.height {
		fmt.Printf("WARNING: WaitForHeight(%d), but the best block is at %d. "+
			"You may wait forever for this block.",
			height, g.height)
	}

	return waitChan
}
1373516
func (t *LLRB) GetHeight(key Item) (result Item, depth int) {
	return t.getHeight(t.root, key)
}
1311814
func (s *Device) SetHeapSize(v int64) *Device {
	s.HeapSize = &v
	return s
}
292235
func (s *VideoDetail) SetHeightInPx(v int64) *VideoDetail {
	s.HeightInPx = &v
	return s
}
869798
func (s *StaticImageActivateScheduleActionSettings) SetHeight(v int64) *StaticImageActivateScheduleActionSettings {
	s.Height = &v
	return s
}