Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 266dd3f

Browse files
authored
Merge pull request #425 from tristan/develop
Wrap encode_hex to support changes to pyrlp 0.4.7
2 parents 22e96d2 + 930b2f5 commit 266dd3f

21 files changed

+53
-24
lines changed

ethereum/abi.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# -*- coding: utf8 -*-
1+
# -*- coding: utf-8 -*-
22
from __future__ import print_function
33

44
import ast
55
import re
66
import warnings
77

88
import yaml # use yaml instead of json to get non unicode (works with ascii only data)
9-
from rlp.utils import decode_hex, encode_hex
9+
from rlp.utils import decode_hex
10+
from ethereum.utils import encode_hex
1011

1112
from ethereum import utils
1213
from ethereum.utils import (

ethereum/blocks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from collections import Iterable
1010
import rlp
1111
from rlp.sedes import big_endian_int, Binary, binary, CountableList
12-
from rlp.utils import decode_hex, encode_hex
12+
from rlp.utils import decode_hex
13+
from ethereum.utils import encode_hex
1314
from ethereum import pruning_trie as trie
1415
from ethereum.pruning_trie import Trie
1516
from ethereum.securetrie import SecureTrie

ethereum/chain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from ethereum.db import OverlayDB
77
from ethereum.utils import to_string, is_string
88
import rlp
9-
from rlp.utils import encode_hex
9+
from ethereum.utils import encode_hex
1010
from ethereum import blocks
1111
from ethereum import processblock
1212
from ethereum.exceptions import VerificationFailed, InvalidTransaction

ethereum/ethash_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import sha3 as _sha3
77
sha3_256 = lambda x: _sha3.sha3_256(x).digest()
88
sha3_512 = lambda x: _sha3.sha3_512(x).digest()
9-
from rlp.utils import decode_hex, encode_hex
9+
from rlp.utils import decode_hex
10+
from ethereum.utils import encode_hex
1011
import sys
1112

1213
WORD_BYTES = 4 # bytes in word

ethereum/fastvm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
from ethereum import opcodes
1414
import time
1515
from ethereum.slogging import get_logger
16-
from rlp.utils import encode_hex, ascii_chr
16+
from rlp.utils import ascii_chr
17+
from ethereum.utils import encode_hex
1718
from ethereum.utils import to_string
1819
import numpy
1920

ethereum/keys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import pbkdf2
33
import sys
44

5-
from rlp.utils import encode_hex, decode_hex
5+
from rlp.utils import decode_hex
6+
from ethereum.utils import encode_hex
67

78
try:
89
scrypt = __import__('scrypt')

ethereum/processblock.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import sys
22
import rlp
33
from rlp.sedes import CountableList, binary
4-
from rlp.utils import decode_hex, encode_hex, ascii_chr
4+
from rlp.utils import decode_hex, ascii_chr
5+
from ethereum.utils import encode_hex
56
from ethereum import opcodes
67
from ethereum import utils
78
from ethereum import specials

ethereum/pruning_trie.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
from ethereum import utils
66
from ethereum.utils import to_string
77
from ethereum.utils import is_string
8+
from ethereum.utils import encode_hex
89
import copy
9-
from rlp.utils import decode_hex, encode_hex, ascii_chr, str_to_bytes
10+
from rlp.utils import decode_hex, ascii_chr, str_to_bytes
1011
import sys
1112
from ethereum.fast_rlp import encode_optimized
1213
rlp_encode = encode_optimized

ethereum/tests/profile_vm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import cProfile
55
import pstats
66
import time
7-
from rlp.utils import encode_hex
7+
from ethereum.utils import encode_hex
88
from ethereum.utils import sha3, to_string
99
from ethereum.slogging import get_logger
1010
logger = get_logger()

ethereum/tests/test_blocks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from ethereum import blocks, utils, db
22
from ethereum.exceptions import VerificationFailed, InvalidTransaction
33
import rlp
4-
from rlp.utils import decode_hex, encode_hex, str_to_bytes
4+
from rlp.utils import decode_hex, str_to_bytes
5+
from ethereum.utils import encode_hex
56
from rlp import DecodingError, DeserializationError
67
import sys
78
import ethereum.testutils as testutils

0 commit comments

Comments
 (0)