Please describe the feature you’d like to see added.
Currently the nLocktime default is set to the current height with a 10% chance to be spread back up to 100 blocks, but only in the send RPC command or GUI wallet flow. Other ways to create a tx like createrawtransaction or walletcreatefundedpsbt default to 0 instead of the anti-fee sniping default. I understand these are more complex user flows but it seems like bitcoin core should be uniform in its default here. Either be opinionated about anti-fee sniping or not.
Is your feature related to a problem, if so please describe it.
Seems like there could be some wallet fingerprint leaks if a tx set uses currentHeight nLocktimes unless the tx has any additional level of complexity and only then uses a 0 nLocktime indicating that a user created a tx using something other than send. Though realistically this seems like a weak link and ultimately I think wallet uniformity is enough of a reason for this change.
Describe the solution you’d like
I think that the rpc commands createrawtransaction and walletcreatefundedpsbt should both default to use anti-fee sniping nLocktimes to make them uniform with the send command.
Describe any alternatives you’ve considered
No response
Please leave any additional context
Its possible I have missed a more fundamental reason why these were not included but in the initial creation #2340 the comment
Set nLockTime on wallet transactions (only, no RPC changes)
Does not give any context or explanation to why they were not also included though this was a very long time ago so maybe there are some additional wallet architecture changes that happened in between then and now.