// NodesByIDPrefix is used to lookup nodes by prefix
NodesByIDPrefix is used to lookup nodes by prefix
// NodesByIDPrefix is used to lookup nodes by prefix
func (s *StateStore) NodesByIDPrefix(ws memdb.WatchSet, nodeID string) (memdb.ResultIterator, error) {
	txn := s.db.Txn(false)
	iter, err := txn.Get("nodes", "id_prefix", nodeID)
	if err != nil {
		return nil, fmt.Errorf("node lookup failed: %v", err)
	}
	ws.Add(iter.WatchCh())
	return iter, nil
}
func ( s * StateStore ) NodesByIDPrefix ( ws memdb . WatchSet , nodeID string ) ( memdb . ResultIterator , error ) { txn := s . db . Txn ( false ) iter , err := txn . Get ( " " , " " , nodeID ) if err != nil { return nil , fmt . Errorf ( " " , err ) } ws . Add ( iter . WatchCh ( ) ) return iter , nil }
NodesByIDPrefix is used to lookup nodes by prefix
NodesByIDPrefix is used to lookup nodes by prefix