pub fn bootstrap(&mut self) -> Vec<Task> {
		match self {
			State::Uninitialized => vec![Task::GetContractBlockHeight],
			State::ContractDetected { .. } => {
				vec![Task::UpdateContractPublicKey]
			}
			State::ContractPublicKeySetup {
				stacks_block_height,
				..
			} => {
				vec![Task::FetchStacksBlock(*stacks_block_height + 1)]
			}
			State::Initialized {
				stacks_block_height,
				bitcoin_block_height,
				deposits,
				withdrawals,
			} => {
				iter::empty()
					.chain(
						deposits
							.iter_mut()
							.filter_map(|deposit| deposit.mint.as_mut()),
					)
					.chain(
						withdrawals
							.iter_mut()
							.filter_map(|withdrawal| withdrawal.burn.as_mut()),
					)
					.for_each(|req| {
						if let TransactionRequest::Acknowledged {
							has_pending_task,
							..
						} = req
						{
							*has_pending_task = false;
						}
					});

				withdrawals
					.iter_mut()
					.filter_map(|withdrawal| withdrawal.fulfillment.as_mut())
					.for_each(|req| {
						if let TransactionRequest::Acknowledged {
							has_pending_task,
							..
						} = req
						{
							*has_pending_task = false;
						}
					});

				vec![
					Task::FetchStacksBlock(*stacks_block_height + 1),
					Task::FetchBitcoinBlock(*bitcoin_block_height + 1),
				]
			}
		}
	}
Spawn initial tasks given a recovered state
romeo/src/state.rs