def Main(): """ :return: """ header = GetHeader(1234) m2 = header.Timestamp + header.Timestamp Notify(m2) bheight = 32 block = GetBlock(bheight) Notify(block) tx = block.Transactions[0] Notify(tx.Hash) # Notify(tx) # tx = block.Transactions[0] # this doesnt seem to work # txhash = tx.Hash # Notify(txhash) return 1
def Main(block_index): """ :param block_index: :return: """ header = GetHeader(block_index) print("got block!") ts = header.Timestamp print("got timestamp") block = GetBlock(block_index) for tx in block.Transactions: type = GetType(tx) hash = GetHash(tx) Notify(type) is_invoke = False if type == INVOKE_TX_TYPE: is_invoke = True if hash == b'\xa0ljY\xd8n\x1b\xb5\xdb\xa0\xf5d\xd8\xb3\xd8\xec\xf2\xfb\xe3E\xe3|3\xba\x83\xf2$jW\xa24': print("correct hash!") else: print("hash does not match") return ts
def generate_uid(ref=''): height = GetHeight() # header = GetHeader(height) # header.Timestamp block = GetBlock(height) timestamp = block.Timestamp tx = block.Transactions[0] tx_hash = tx.Hash time_hash = concat(timestamp, tx_hash) return concat(time_hash, ref)
def Main(): """ :return: """ block_height = 123234 block = GetBlock(block_height) print("hello") Notify(block) a = 1 return block_height
def Main(): # blockhash = b'\xe9F.\xbd\x83\x99\xb4\xa3Z\xdc\xdde\xe5^\xed\xf6\x9f\x82\xa3\x14\xc9y\x04\xb8\xfe\x8cb\xafO.\xe7\xd9' """ :return: """ block_height = 123234 block = GetBlock(block_height) print("hello") Notify(block) a = 1 return block_height
def Main(): """ :return: """ height = 1242 header = GetHeader(height) m2 = header.Timestamp + header.Timestamp root = header.MerkleRoot # Notify(root) hash = header.Hash prev = header.PrevHash # Notify(hash) # Notify(prev) bheight = 32566 block = GetBlock(bheight) tx = block.Transactions[0] Notify(tx) # tx = GetTransaction(block, 0) # tx = GetTransaction(block, 0) # Notify(tx) # tx = block.Transactions[0] # this doesnt seem to work txhash = tx.Hash Notify(txhash) return 1