code: def setup_recovery(working_dir):
      
      db = get_db_state(working_dir)
      bitcoind_session = get_bitcoind(new=True)
      assert bitcoind_session is not None
  
      _, current_block = virtualchain.get_index_range('bitcoin', bitcoind_session, virtualchain_hooks, working_dir)
      assert current_block, 'Failed to connect to bitcoind'
  
      set_recovery_range(working_dir, db.lastblock, current_block - NUM_CONFIRMATIONS)
      return True
docs: Set up the recovery metadata so we can fully recover secondary state,
      like subdomains.