Repository navigation
Conversation
…eamMW#2177) An offline (push) receipt is exported with MyAddressID but without MyAddr. The import checked that id against an empty WalletID, rejected the receipt and so reported the whole import as failed. MyAddressID is checked only when there is a MyAddr to check it against. Test: wallet_db_test's export/import case gives its push tx a MyAddressID, as a real offline receipt has; it failed before the fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2177.
An offline (push) receipt is exported with
MyAddressIDbut withoutMyAddr.ImportTransactionsFromJsonchecked that id againstwid, stillZerowith noMyAddr, soValidateSbbsWalletIDfailed, the receipt was skipped and the whole import reported a failure (everything else already written). NowMyAddressIDis checked only when there is aMyAddrto check it against; such a receipt imports with the existing "Cannot check imported address" warning.Test:
wallet_db_test's export/import case (TestExportImportTx) gives its push tx aMyAddressID, as a real offline receipt has. Without the fix it fails at bothImportDataFromJsonchecks ("Invalid MyAddressID parameter"); with it, it passes.