code: func (s *GlobalStore) nodes(key []byte, startAddr *common.Address, limit int) (nodes mock.Nodes, err error) {
  	iter := s.db.NewIterator(nil, nil)
  	defer iter.Release()
  
  	if limit <= 0 {
  		limit = mock.DefaultLimit
  	}
  
  	prefix := []byte{indexForNodesPrefix}
  	if key != nil {
  		prefix = indexForNodesWithHashPrefix(key)
  	}
  	startKey := prefix
  	if startAddr != nil {
  		if key != nil {
  			startKey = indexForNodesWithHash(key, *startAddr)
  		} else {
  			startKey = indexForNodes(*startAddr)
  		}
  	}
  
  	ok := iter.Seek(startKey)
  	if !ok {
  		return nodes, iter.Error()
  	}
  	for ; ok; ok = iter.Next() {
  		k := iter.Key()
  		if !bytes.HasPrefix(k, prefix) {
  			break
  		}
  		addr := common.BytesToAddress(append([]byte(nil), bytes.TrimPrefix(k, prefix)...))
  
  		if len(nodes.Addrs) >= limit {
  			nodes.Next = &addr
  			break
  		}
  
  		nodes.Addrs = append(nodes.Addrs, addr)
  	}
  	return nodes, iter.Error()
  }
docs: // nodes returns a paginated list of node addresses. If key is not nil,
  // only nodes that contain that key will be returned.