This would allow wallet operations like funding transactions with smart contract-based inputs such as LN, or any input the Core wallet doesn't know how to sign for.

https://github.com/bitcoin/bitcoin/pull/17211#issuecomment-933674310
CCoinControl coin_control;
        coin_control.m_feerate.emplace(10000);
        coin_control.fOverrideFeeRate = true;
        
        coin_control.m_change_type = OutputType::LEGACY;
        FeeCalculation fee_calc;
        BOOST_CHECK(CreateTransaction(*wallet, {recipient}, tx, fee, change_pos, error, coin_control, fee_calc));
        BOOST_CHECK_EQUAL(tx->vout.size(), 1);
        BOOST_CHECK_EQUAL(tx->vout[0].nValue, recipient.nAmount + leftover_input_amount - fee);
        BOOST_CHECK_GT(fee, 0);
        return fee;
    };
    
    
    const CAmount fee{check_tx(0)};
    
    
    BOOST_CHECK_EQUAL(fee, check_tx(123));
    
    
    BOOST_CHECK_EQUAL(fee, check_tx(fee));
    
    
    
    
    BOOST_CHECK_EQUAL(fee, check_tx(fee + 123));
}
BOOST_AUTO_TEST_SUITE_END()
}