From: Forrest Voight Date: Tue, 13 Dec 2011 11:39:45 +0000 (-0500) Subject: moved util.dicts to util.slush and removed unused update_dict function X-Git-Tag: 0.8.2~113 X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=f94a732fb01e3d9c8791a9ad04e2112bd363da99;p=p2pool.git moved util.dicts to util.slush and removed unused update_dict function --- diff --git a/p2pool/bitcoin/data.py b/p2pool/bitcoin/data.py index ad090f2..c8d9743 100644 --- a/p2pool/bitcoin/data.py +++ b/p2pool/bitcoin/data.py @@ -4,7 +4,7 @@ import hashlib import struct from . import base58 -from p2pool.util import bases, math, expiring_dict, memoize, dicts +from p2pool.util import bases, math, expiring_dict, memoize, slush import p2pool class EarlyEnd(Exception): @@ -87,7 +87,7 @@ class Type(object): unpack = memoize.memoize_with_backing(_backing)(unpack) # doesn't have an inverse def pack(self, obj): - return self.pack2(dicts.immutify(obj)) + return self.pack2(slush.immutify(obj)) def pack_base58(self, obj): @@ -163,14 +163,14 @@ class FixedStrType(Type): class EnumType(Type): def __init__(self, inner, values): self.inner = inner - self.values = dicts.frozendict(values) + self.values = slush.frozendict(values) keys = {} for k, v in values.iteritems(): if v in keys: raise ValueError('duplicate value in values') keys[v] = k - self.keys = dicts.frozendict(keys) + self.keys = slush.frozendict(keys) def read(self, file): data, file = self.inner.read(file) @@ -421,7 +421,7 @@ address_type = ComposedType([ tx_type = ComposedType([ ('version', StructType('