MCPcopy Index your code
hub / github.com/petertodd/python-bitcoinlib / test_twelve

Method test_twelve

bitcoin/tests/test_serialize.py:125–127  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

123 return
124
125 def test_twelve(self):
126 self.assertEqual(uint256_from_compact(0x01123456), 0x0012)
127 self.assertEqual(compact_from_uint256(0x0012), 0x01120000)
128
129 def test_from_uint256(self):
130 self.assertEqual(compact_from_uint256(0x1234), 0x02123400)

Callers

nothing calls this directly

Calls 2

uint256_from_compactFunction · 0.85
compact_from_uint256Function · 0.85

Tested by

no test coverage detected