pub fn insert(
        &mut self,
        transaction: L2Tx,
        constraint: TransactionTimeRangeConstraint,
    ) -> InsertionMetadata {
        let mut metadata = InsertionMetadata::default();
        let nonce = transaction.common_data.nonce;
        // skip insertion if transaction is old
        if nonce < self.nonce {
            return metadata;
        }
        let new_score = Self::score_for_transaction(&transaction);
        let previous_score = self
            .transactions
            .insert(nonce, (transaction, constraint))
            .map(|x| Self::score_for_transaction(&x.0));
        metadata.is_new = previous_score.is_none();
        if nonce == self.nonce {
            metadata.new_score = Some(new_score);
            metadata.previous_score = previous_score;
        }
        metadata
    }
Inserts new transaction for given account. Returns insertion metadata
core/lib/mempool/src/types.rs