Skip to content

Commit

Permalink
Merge 7556d58 into 21232bf
Browse files Browse the repository at this point in the history
  • Loading branch information
damascene authored May 14, 2021
2 parents 21232bf + 7556d58 commit 33e80be
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Create translations (optional)::
sudo apt-get install python-requests gettext
./contrib/make_locale

For plugin development, see the `plugin documentation <plugins/README.rst>`_.
For plugin development, see the `plugin documentation <electroncash_plugins/README.rst>`_.

Running unit tests (very optional, advanced users only)::

Expand Down
2 changes: 1 addition & 1 deletion electroncash/slp_graph_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def search_query(self, job):
if dat.get('message', None):
msg = dat['message']
if 'txid is missing from slp validity set' in msg:
raise Exception('likely invalid slp')
raise Exception("maybe invalid slp (gs returned: 'txid is missing from slp validity set')")
raise Exception(dat)

# NOTE: THE FOLLOWING IS FOR DEBUG PURPOSES TO CHECK
Expand Down
6 changes: 4 additions & 2 deletions electroncash/slp_validator_0x01.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ def fetch_hook(txids, val_job):

def done_callback(job):

if not wallet_ref:
# make sure the wallet is still allocated
wallet = wallet_ref()
if wallet is None:
return

# wait for proxy stuff to roll in
Expand All @@ -230,7 +232,7 @@ def done_callback(job):
for t,n in job.nodes.items():
val = n.validity
if val != 0:
wallet_ref().slpv1_validity[t] = val
wallet.slpv1_validity[t] = val

# get transaction block height
height = wallet.verified_tx.get(txid, (-1,None,None))[0]
Expand Down
8 changes: 8 additions & 0 deletions electroncash/slp_validator_0x01_nft1.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,15 @@ def fetch_hook(txids, val_job):

return l

wallet_ref = weakref.ref(wallet)

def done_callback(job):

# make sure the wallet is still allocated
wallet = wallet_ref()
if wallet is None:
return

# wait for proxy stuff to roll in
results = {}
try:
Expand Down
5 changes: 2 additions & 3 deletions electroncash/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1851,12 +1851,11 @@ def slp_check_validation(self, tx_hash, tx):
is_new = False
if tti['validity'] == 0 and tti['token_id'] in self.token_types and not is_new and tti['type'] in ['SLP1','SLP65','SLP129']:
def callback(job):
if slp_gs_mgr.slp_validity_signal == None:
return
(txid,node), = job.nodes.items()
val = node.validity
tti['validity'] = val
slp_gs_mgr.slp_validity_signal.emit(txid, val)
if slp_gs_mgr.slp_validity_signal is not None:
slp_gs_mgr.slp_validity_signal.emit(txid, val)

if tti['type'] == 'SLP1':
job = self.slp_graph_0x01.make_job(tx, self, self.network,
Expand Down

0 comments on commit 33e80be

Please sign in to comment.