Add support to change the base URL of service.#259
Closed
vincenzopalazzo wants to merge 0 commit intopetertodd:masterpetertodd/python-bitcoinlib:masterfrom
Closed
Add support to change the base URL of service.#259vincenzopalazzo wants to merge 0 commit intopetertodd:masterpetertodd/python-bitcoinlib:masterfrom
vincenzopalazzo wants to merge 0 commit intopetertodd:masterpetertodd/python-bitcoinlib:masterfrom
Conversation
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.
With Bitcoin 0.21.0 we there is no default wallet, and I realized that there is no way to change the base URL inside the library to change the RPC URL.
In order to give the possibility to change the URL at runtime I added an additional propriety
base_urlthat can be used to store get the basic URL given by the__init__method.I added the set and getter method to work change the URL path.
This can be an example of proxy that handle all change alone
This is a test to reproduce the failure that require to change URL in the RPC request
A complete test suite that test this feature is available here: https://gitlab.com/vincenzopalazzo/draft-ideas/-/blob/master/pyln-test-sandbox/test/test_multiple_wallet.py
PS: Maybe the test architecture used in the previous link can be helpful in this repository to start to make test on the rpc interface?