Support for confirmations number in transactions.

This commit is contained in:
Alexey V. Litvinov 2018-10-18 16:15:20 +10:00
parent 339363b575
commit 4fc8495727
2 changed files with 3 additions and 0 deletions

View File

@ -267,6 +267,7 @@ class JSONRPCWallet(object):
'height': data.get('height', data.get('block_height')) or None,
'timestamp': datetime.fromtimestamp(data['timestamp']) if 'timestamp' in data else None,
'blob': data.get('blob', None),
'confirmations': data.get('confirmations', None)
})
def export_outputs(self):

View File

@ -70,6 +70,7 @@ class Transaction(object):
timestamp = None
key = None
blob = None
confirmations = None
def __init__(self, **kwargs):
self.hash = kwargs.get('hash', self.hash)
@ -78,6 +79,7 @@ class Transaction(object):
self.timestamp = kwargs.get('timestamp', self.timestamp)
self.key = kwargs.get('key', self.key)
self.blob = kwargs.get('blob', self.blob)
self.confirmations = kwargs.get('confirmations', self.confirmations)
def __repr__(self):
return self.hash