Skip to content
Snippets Groups Projects
Commit c35147ea authored by Vincent Texier's avatar Vincent Texier
Browse files

Merge branch 'master' into view_in_wot

parents f7bb5b0b 57e00bcf
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ Created on 2 déc. 2014 ...@@ -6,6 +6,7 @@ Created on 2 déc. 2014
from . import Document from . import Document
import re import re
import logging
class Transaction(Document): class Transaction(Document):
''' '''
...@@ -40,7 +41,7 @@ SIGNATURE ...@@ -40,7 +41,7 @@ SIGNATURE
''' '''
re_type = re.compile("Type: (Transaction)\n") re_type = re.compile("Type: (Transaction)\n")
re_header = re.compile("TX:([0-9])+:([0-9])+:([0-9])+:([0-9])+:(0|1)\n") re_header = re.compile("TX:([0-9]+):([0-9]+):([0-9]+):([0-9]+):(0|1)\n")
re_issuers = re.compile("Issuers:\n") re_issuers = re.compile("Issuers:\n")
re_inputs = re.compile("Inputs:\n") re_inputs = re.compile("Inputs:\n")
re_outputs = re.compile("Outputs:\n") re_outputs = re.compile("Outputs:\n")
......
__version_info__ = ('0', '7', '5') __version_info__ = ('0', '7', '6')
__version__ = '.'.join(__version_info__) __version__ = '.'.join(__version_info__)
...@@ -104,8 +104,13 @@ class Cache(): ...@@ -104,8 +104,13 @@ class Cache():
for block_number in parsed_blocks: for block_number in parsed_blocks:
block = community.request(bma.blockchain.Block, block = community.request(bma.blockchain.Block,
req_args={'number': block_number}) req_args={'number': block_number})
signed_raw = "{0}{1}\n".format(block['raw'], block['signature']) signed_raw = "{0}{1}\n".format(block['raw'],
block_doc = Block.from_signed_raw(signed_raw) block['signature'])
try:
block_doc = Block.from_signed_raw(signed_raw)
except:
logging.debug("Error in {0}".format(block_number))
raise
for tx in block_doc.transactions: for tx in block_doc.transactions:
in_outputs = [o for o in tx.outputs in_outputs = [o for o in tx.outputs
if o.pubkey == self.wallet.pubkey] if o.pubkey == self.wallet.pubkey]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment