-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kill Addrindexrs #2864
base: develop
Are you sure you want to change the base?
Kill Addrindexrs #2864
Conversation
ouziel-slama
commented
Dec 18, 2024
•
edited
Loading
edited
- Mock get_oldest_tx()
- use Electr to get utxos and address history
- Double-check the spelling and grammar of all strings, code comments, etc.
- Double-check that all code is deterministic that needs to be
- Add tests to cover any new or revised logic
- Ensure that the test suite passes
- Update the project release notes
- Update the project documentation, as appropriate, with a corresponding Pull Request in the Documentation repository
@@ -37,6 +37,17 @@ | |||
STATUS_CLOSED = 10 | |||
STATUS_CLOSING = 11 | |||
|
|||
CURR_DIR = os.path.dirname(os.path.realpath(__file__)) | |||
with open(os.path.join(CURR_DIR, "data", "get_oldest_tx.json")) as f: |
Check warning
Code scanning / pylint
Using open without explicitly specifying an encoding. Warning
@@ -925,17 +919,13 @@ | |||
|
|||
@dispatcher.add_method | |||
def search_raw_transactions(address, unconfirmed=True, only_tx_hashes=False): | |||
return backend.addrindexrs.search_raw_transactions( | |||
return backend.electr.get_history( |
Check warning
Code scanning / pylint
Unexpected keyword argument 'only_tx_hashes' in function call. Warning
@@ -18,6 +18,7 @@ | |||
- Add a timeout to parse mempool transaction from ZMQ | |||
- Add cache for unsupported transactions when parsing raw | |||
- Refactor bootstrap: clean code, use `zstd` instead `gzip`, decompress and verify signature in parallel | |||
- Remove Addrindexrs dependency: mock `get_oldest_tx()`, use Electr to get utxos and address history |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> "to get utxos and address history for tx composition"
@@ -618,6 +585,16 @@ def initialise_config( | |||
config.GUNICORN_THREADS_PER_WORKER = gunicorn_threads_per_worker | |||
config.GUNICORN_WORKERS = gunicorn_workers | |||
|
|||
if electr_url: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
electr
-> electrs
) as e: | ||
import traceback |
Check warning
Code scanning / pylint
Import outside toplevel (traceback). Warning
return return_result(400, error=str(e), start_time=start_time, query_args=query_args) | ||
except Exception as e: | ||
capture_exception(e) | ||
logger.error("Error in API: %s", e) | ||
# import traceback | ||
# print(traceback.format_exc()) | ||
import traceback |
Check warning
Code scanning / pylint
Import outside toplevel (traceback). Warning
def pubkey_from_inputs_set(inputs_set, pubkeyhash): | ||
utxos = inputs_set.split(",") | ||
utxos = [utxo.split(":")[0] for utxo in utxos] | ||
for tx_hash in utxos: |
Check warning
Code scanning / pylint
Too many nested blocks (6/5). Warning
def pubkey_from_inputs_set(inputs_set, pubkeyhash): | ||
utxos = inputs_set.split(",") | ||
utxos = [utxo.split(":")[0] for utxo in utxos] | ||
for tx_hash in utxos: |
Check warning
Code scanning / pylint
Too many nested blocks (6/5). Warning