We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b025839 commit aece765Copy full SHA for aece765
core/src/apps/polkadot/codec/types.py
@@ -21,7 +21,7 @@ def process_compact_bytes(self):
21
elif byte_mod == 2:
22
self.compact_length = 4
23
else:
24
- self.compact_length = int(5 + (compact_byte[0] - 3) / 4)
+ self.compact_length = int(5 + (compact_byte[0] - 3) >> 2)
25
26
if self.compact_length == 1:
27
self.compact_bytes = compact_byte
@@ -37,7 +37,7 @@ def process_compact_bytes(self):
37
def process(self):
38
self.process_compact_bytes()
39
if self.compact_length <= 4:
40
- return int(int.from_bytes(self.compact_bytes, "little") / 4)
+ return int(int.from_bytes(self.compact_bytes, "little") >> 2)
41
42
return int.from_bytes(self.compact_bytes, "little")
43
0 commit comments