Skip to content

Conversation

S3RK
Copy link
Contributor

@S3RK S3RK commented Jan 17, 2022

This reverts commit d045664 from #22929.

This commit was based on invalid assumption that mapTxSpends should contain only outgoing txs and broke wallet conflicts feature.

@S3RK
Copy link
Contributor Author

S3RK commented Jan 17, 2022

cc @luke-jr @achow101

@achow101
Copy link
Member

Can we get a test for this behavior?

@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #22693 (RPC/Wallet: Add "use_txids" to output of getaddressinfo by luke-jr)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@S3RK
Copy link
Contributor Author

S3RK commented Jan 18, 2022

Can we get a test for this behavior?

Added a test, that fails before the revert and passes after. Not sure if there are other things to test.

But on the second thought, I should've just added some new assertions in an existing test rather than a create a new test file. I'll find a new home for it, maybe in wallet_abandonconflict.py. Wdyt?

verify wallet conflicts from the receiver's side
@S3RK S3RK force-pushed the restore_wallet_conflicts branch from a424547 to 3ee6d07 Compare January 20, 2022 09:15
@S3RK
Copy link
Contributor Author

S3RK commented Jan 20, 2022

Moved tests to the existing file. This is ready for review

@achow101
Copy link
Member

The rename in the test seems unnecessary. It adds a lot of noise to the commit.

@S3RK
Copy link
Contributor Author

S3RK commented Jan 21, 2022

The rename in the test seems unnecessary. It adds a lot of noise to the commit.

We need two wallets on the same node to verify the intended behavior. That means we need to specify wallet each time we call an RPC.

One way we can workaround that is to unload the second wallet. But I'm not convinced this is better as it makes the test more fragile. Do you have other ideas how to avoid renames?

@achow101
Copy link
Member

We need two wallets on the same node to verify the intended behavior. That means we need to specify wallet each time we call an RPC.

Ah, it looked like you were just replacing self.nodes[0] and self.nodes[1] with alice, and bob, but looking more closely, it is actually different.

@achow101
Copy link
Member

ACK 3ee6d07

@S3RK
Copy link
Contributor Author

S3RK commented Jan 27, 2022

Do we want to have it in 23.0 milestone?

@maflcko maflcko added this to the 23.0 milestone Jan 27, 2022
Copy link
Member

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

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

Confirmed:

  • included test fails on master (for expected reason) and passes on PR
  • revert is a clean and accurate revert
  • code changes look reasonable

I think it'd be a better test if the wallets aren't in the same node, but I guess this is fine.

tACK

@achow101 achow101 merged commit 02e1d8d into bitcoin:master Feb 1, 2022
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 1, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants