obsidiansystems / ledger-app-nervos

MIT License
10 stars 10 forks source link

Fix and simplify self-transfer #172

Closed Ericson2314 closed 3 years ago

Ericson2314 commented 3 years ago
  1. We only decide what's a self transfer at the end, once we can see all outputs.

  2. We no longer worry about any "source is destination case", a "self-transfer" is one only to the change path, and the actual self address doesn't matter.

  3. I have to write the first output for dao deposit to work. This makes 0 sense to me, except the old code also relied on this, due to due deposits (unintentionally?) hitting self-transfer code path. We ought to investigate this further, later, I think.