From 9280ac62a75b46c5931f0717473772984709f9da Mon Sep 17 00:00:00 2001 From: Vanshdeep Singh Date: Mon, 3 Sep 2018 09:50:37 +0200 Subject: [PATCH] Problem: memoization for `from_dict` not enabled Solution: Enable memoization decorator --- bigchaindb/common/transaction.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bigchaindb/common/transaction.py b/bigchaindb/common/transaction.py index 1097deea..b1c8fe44 100644 --- a/bigchaindb/common/transaction.py +++ b/bigchaindb/common/transaction.py @@ -13,7 +13,6 @@ Attributes: from collections import namedtuple from copy import deepcopy from functools import reduce, lru_cache -import functools import rapidjson import base58 @@ -29,7 +28,7 @@ from bigchaindb.common.exceptions import (KeypairMismatchException, AmountError, AssetIdMismatch, ThresholdTooDeep) from bigchaindb.common.utils import serialize -from .memoize import memoize_from_dict, memoize_to_dict +from .memoize import memoize_from_dict # , memoize_to_dict UnspentOutput = namedtuple( @@ -1184,7 +1183,7 @@ class Transaction(object): raise InvalidHash(err_msg.format(proposed_tx_id)) @classmethod - # @memoize_from_dict + @memoize_from_dict def from_dict(cls, tx, skip_schema_validation=True): """Transforms a Python dictionary to a Transaction object.