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

Function str_money_value

bitcoin/core/__init__.py:60–66  ·  view source on GitHub ↗

Convert an integer money value to a fixed point string

(value)

Source from the content-addressed store, hash-verified

58 return binascii.hexlify(b[::-1]).decode('utf8')
59
60def str_money_value(value):
61 """Convert an integer money value to a fixed point string"""
62 r = '%i.%08i' % (value // COIN, value % COIN)
63 r = r.rstrip('0')
64 if r[-1] == '.':
65 r += '0'
66 return r
67
68
69class ValidationError(Exception):

Callers 3

__repr__Method · 0.85
TMethod · 0.85
publish-text.pyFile · 0.85

Calls

no outgoing calls

Tested by 1

TMethod · 0.68