MCPcopy Create free account
hub / github.com/ElementsProject/elements / get_blk_dt

Function get_blk_dt

contrib/linearize/linearize-data.py:67–72  ·  view source on GitHub ↗
(blk_hdr)

Source from the content-addressed store, hash-verified

65 return hash_str
66
67def get_blk_dt(blk_hdr):
68 members = struct.unpack("<I", blk_hdr[68:68+4])
69 nTime = members[0]
70 dt = datetime.datetime.fromtimestamp(nTime)
71 dt_ym = datetime.datetime(dt.year, dt.month, 1)
72 return (dt_ym, nTime)
73
74# When getting the list of block hashes, undo any byte reversals.
75def get_block_hashes(settings):

Callers 1

writeBlockMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected