|
1 | 1 | {
|
2 | 2 | "todo1": "probably not working correctly with orphan blocks. 'visible' is always 1 on m_trackingModeSpentTransfers",
|
3 |
| - "todo2": "transfers with only <UNKNOWN> are not returned when search is only with address. Huge optimization will be to know which <UNKNOWN> belongs to which address", |
4 | 3 | "file": "walletd-spent-transfers-tracking-mode.json",
|
5 | 4 | "description": "Adds 'spent transfers' list in walletd in tracking mode.",
|
6 | 5 | "required": [
|
|
157 | 156 | {
|
158 | 157 | "path": "/src/Transfers/TransfersContainer.cpp",
|
159 | 158 | "changes": [
|
160 |
| - { |
161 |
| - "action": "replace", |
162 |
| - "marker": "updateTransfersVisibility(info.keyImage);", |
163 |
| - "parameters": { |
164 |
| - "text": [ |
165 |
| - "if (trackingMode == 0) {", |
166 |
| - " updateTransfersVisibility(info.keyImage);", |
167 |
| - "}" |
168 |
| - ] |
169 |
| - } |
170 |
| - }, |
| 159 | + { |
| 160 | + "action": "replace", |
| 161 | + "marker": "updateTransfersVisibility(transfer.keyImage);", |
| 162 | + "parameters": { |
| 163 | + "text": [ |
| 164 | + " if (trackingMode == 0) {", |
| 165 | + " updateTransfersVisibility(transfer.keyImage);", |
| 166 | + " }" |
| 167 | + ] |
| 168 | + } |
| 169 | + }, |
| 170 | + |
171 | 171 |
|
| 172 | + { |
| 173 | + "action": "replace", |
| 174 | + "marker": "updateTransfersVisibility(info.keyImage);", |
| 175 | + "parameters": { |
| 176 | + "text": [ |
| 177 | + "if (trackingMode == 0) {", |
| 178 | + " updateTransfersVisibility(info.keyImage);", |
| 179 | + "}" |
| 180 | + ] |
| 181 | + } |
| 182 | + }, |
172 | 183 | {
|
173 | 184 | "action": "replace",
|
174 | 185 | "marker": "static_assert(sizeof(size_t) < sizeof(*m_keyImage), \"sizeof(size_t) < sizeof(*m_keyImage)\");",
|
|
212 | 223 | "marker": "return other.m_type == m_type && *other.m_keyImage == *m_keyImage;",
|
213 | 224 | "parameters": {
|
214 | 225 | "text": [
|
| 226 | + |
215 | 227 | " if (m_trackingMode == 1) {",
|
216 | 228 | " return other.m_type == m_type && other.m_amount == m_amount && other.m_globalOutputIndex == m_globalOutputIndex;",
|
217 | 229 | " } else {",
|
|
491 | 503 | " bool added = transfers.addTransaction(trackingMode, blockInfo, tx, transfersList);"
|
492 | 504 | ]
|
493 | 505 | }
|
| 506 | + }, |
| 507 | + { |
| 508 | + "action": "replace", |
| 509 | + "marker": "transfers.markTransactionConfirmed(block, transactionHash, globalIndices);", |
| 510 | + "parameters": { |
| 511 | + "text": [ |
| 512 | + " bool trackingMode = subscription.keys.spendSecretKey == NULL_SECRET_KEY;", |
| 513 | + " transfers.markTransactionConfirmed(trackingMode, block, transactionHash, globalIndices);;" |
| 514 | + ] |
| 515 | + } |
494 | 516 | }
|
495 | 517 | ]
|
496 | 518 | },
|
|
0 commit comments