From adec71501066f58928e05e5991aaaaeb66da1fca Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 12 Jul 2018 12:14:04 -0400 Subject: [PATCH] + ledger.get_transaction() --- torba/baseledger.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/torba/baseledger.py b/torba/baseledger.py index 26adbc86f..339b111ef 100644 --- a/torba/baseledger.py +++ b/torba/baseledger.py @@ -125,6 +125,12 @@ class BaseLedger(six.with_metaclass(LedgerRegistry)): if self.network.is_connected: yield self.update_account(account) + @defer.inlineCallbacks + def get_transaction(self, txhash): + raw, height, is_verified = yield self.db.get_transaction(txhash) + if raw is not None: + defer.returnValue(self.transaction_class(raw)) + @defer.inlineCallbacks def get_private_key_for_address(self, address): match = yield self.db.get_address(address)