deroproject / derohe

DERO Homomorphic Encryption Blockchain Protocol
Other
208 stars 82 forks source link

Fix: Incorrect "sender" on incoming transactions #144

Closed 8lecramm closed 1 year ago

8lecramm commented 1 year ago

Description

Please include a summary of the changes and the related issue.

NOTE: The process is the following:

Fixes # (issue)

Type of change

Please select the right one.

Which part is impacted ?

Checklist:

License

I'm am contributing & releasing the code under DERO Research License (which can be found here).

Summary

Wallet entries list one's wallet address for incoming transactions if the ringsize is greater than 2. The sender index is determined by sender_idx := uint(tx.Payloads[t].RPCPayload[0]) and isn't touched again for ringsizes > 2. RPCPayload[0] always contains the receiver index. The values is placed there during transaction creation. GetTransferbyTXID, GetTransfers and the exported wallet history are affected. I recommend leaving the "sender" field blank for such transactions to avoid confusion, as the sender cannot be determined.