1
0

wallet: towards restoring previous performance

This commit is contained in:
SomberNight
2019-03-01 16:57:19 +01:00
parent 8b2c586d30
commit 2ad73050b3
5 changed files with 18 additions and 17 deletions

View File

@@ -28,7 +28,7 @@ import json
import copy
import threading
from collections import defaultdict
from typing import Dict
from typing import Dict, Optional
from . import util, bitcoin
from .util import PrintError, profiler, WalletFileException, multisig_type, TxMinedInfo
@@ -585,7 +585,7 @@ class JsonDB(PrintError):
return Transaction(tx) if tx else None
@locked
def get_transaction(self, tx_hash):
def get_transaction(self, tx_hash) -> Optional[Transaction]:
tx = self.transactions.get(tx_hash)
return Transaction(tx) if tx else None
@@ -632,6 +632,9 @@ class JsonDB(PrintError):
def remove_verified_tx(self, txid):
self.verified_tx.pop(txid, None)
def is_in_verified_tx(self, txid):
return txid in self.verified_tx
@modifier
def update_tx_fees(self, d):
return self.tx_fees.update(d)