rippled icon indicating copy to clipboard operation
rippled copied to clipboard

will there be payee and payer that are the same with a transaction?

Open xiongjiabing opened this issue 2 years ago • 6 comments

hi team, will there be payee and payer that are the same with a transaction? Now I've found similar transactions on other networks,e.g. CELO,TIA

Each block contains a large number of such transactions,I worry that XRP will have similar problems

xiongjiabing avatar Jan 02 '24 06:01 xiongjiabing

And these transactions are very small

xiongjiabing avatar Jan 02 '24 06:01 xiongjiabing

You cannot send a Payment transaction to yourself.

mvadari avatar Jan 02 '24 15:01 mvadari

Indeed; as I was looking to answer this issue I found that this is enforced in preflight, so the check is very cheap to do. However I also noticed that there's no unit test for this check, will add it.

Bronek avatar Jan 02 '24 16:01 Bronek

Test added in https://github.com/XRPLF/rippled/pull/4860

Bronek avatar Jan 02 '24 16:01 Bronek

You cannot send a Payment transaction to yourself.

I think you can send a payment transaction to yourself as long as it crosses offers (currency conversion) and the sent currency does not equal the receiving currency.

nixer89 avatar Jan 05 '24 07:01 nixer89

You cannot send a Payment transaction to yourself.

I think you can send a payment transaction to yourself as long as it crosses offers (currency conversion) and the sent currency does not equal the receiving currency.

That's true, but it requires a path, hence involvement of other accounts.

Bronek avatar Jan 05 '24 12:01 Bronek

No changes in regard to this issue are planned in the future.

Bronek avatar Feb 27 '24 17:02 Bronek