-// CalcNextSeed return the seed for the given block
-func (c *Chain) CalcNextSeed(preBlock *bc.Hash) (*bc.Hash, error) {
- node := c.index.GetNode(preBlock)
- if node == nil {
- return nil, errors.New("can't find preblock in the blockindex")
- }
- return node.CalcNextSeed(), nil
-}
-
-// CalcNextBits return the seed for the given block
-func (c *Chain) CalcNextBits(preBlock *bc.Hash) (uint64, error) {
- node := c.index.GetNode(preBlock)
- if node == nil {
- return 0, errors.New("can't find preblock in the blockindex")
- }
- return node.CalcNextBits(), nil
-}
-