Skip to content

Conversation

@xdustinface
Copy link

The wallet should be removed after the dumpwallet() call otherwise it
may lead to unepexted behaviour in other wallet tests since the wallet
stays in vpwallets then.

The wallet should be removed after the dumpwallet() call otherwise it 
may lead to unepexted behaviour in other wallet tests since the wallet 
stays in vpwallets then.
@PastaPastaPasta
Copy link
Member

PastaPastaPasta commented Aug 21, 2020

Good find, however, please backport (modified) bitcoin#13007 instead

@xdustinface
Copy link
Author

Good find, however, please backport (modified) bitcoin#13007 instead

hmm after a quick check im not sure if that makes sense? First, seems like we are already behind the code in that PR and even by backporting it "modified" the outcome would be the same it seems, no?

@UdjinM6
Copy link

UdjinM6 commented Aug 22, 2020

the outcome would be the same it seems, no?

Not quite, you'd also have to move another RemoveWallet(&wallet); and place it right next to ::importwallet(request); line. Not sure if we have to actually backport 13007, could simply tweak PR title imo if the reason is to make it easy to find it in git logs after merge.

@xdustinface
Copy link
Author

the outcome would be the same it seems, no?

Not quite, you'd also have to move another RemoveWallet(&wallet); and place it right next to ::importwallet(request); line. Not sure if we have to actually backport 13007, could simply tweak PR title imo if the reason is to make it easy to find it in git logs after merge.

That would still not follow the bitcoin PR exactly, would it? I mean our RemoveWallet(&wallet) is already few lines up from where it is in the bitcoin PR, so its already in the same scope, no?

@PastaPastaPasta PastaPastaPasta changed the title test: Fix importwallet_rescan test Merge #13007: test: Fix dangling wallet pointer in vpwallets Aug 23, 2020
@PastaPastaPasta
Copy link
Member

Please apply PastaPastaPasta@c9ab591, also changed title so that this is in git log showing up the backport even though due to the order of things this is kinda a backport and kinda not

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, performed code review, and ran tests locally

@UdjinM6 UdjinM6 added this to the 16 milestone Aug 24, 2020
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@UdjinM6 UdjinM6 changed the title Merge #13007: test: Fix dangling wallet pointer in vpwallets Merge #13007: test: Fix dangling wallet pointer in vpwallets Aug 24, 2020
@UdjinM6 UdjinM6 merged commit 997e794 into dashpay:develop Aug 24, 2020
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Sep 8, 2020
…ashpay#3666)

* test: Fix importwallet_rescan test

The wallet should be removed after the dumpwallet() call otherwise it 
may lead to unepexted behaviour in other wallet tests since the wallet 
stays in vpwallets then.

* tests: Change where RemoveWallet call is to be more in line with upstream

Signed-off-by: pasta <[email protected]>

Co-authored-by: pasta <[email protected]>
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Mar 13, 2022
…ashpay#3666)

* test: Fix importwallet_rescan test

The wallet should be removed after the dumpwallet() call otherwise it
may lead to unepexted behaviour in other wallet tests since the wallet
stays in vpwallets then.

* tests: Change where RemoveWallet call is to be more in line with upstream

Signed-off-by: pasta <[email protected]>

Co-authored-by: pasta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants