""" Last Block that you have process in your backend. Processing will continue at `last_block + 1` """ last_block = 1 """ Witness accounts to monitor """ watch_accounts = ["roadscape", "kushed", "smooth.witness", "abit", "pharesim", "dele-puppy", "steemed", "nextgencrypto", "clayop", "au1nethyb1", "steempty", "riverhead", "arhag", "complexring", "bitcube", "silversteem", "xeldal", "witness.svk", "wackou", "bhuz", "steemychicken1", "datasecuritynode", "cyrano.witness", "delegate.lafona", "boatymcboatface", "jabbasteem", "bue", "ihashfury", "masteryoda", "joseph", "pumpkin", "blocktrades", "steem-id", "liondani", "salvation", "modprobe", "dantheman", "mrs.agsexplorer", "fminerten", "lafona", "pfunk", "summon", "randaletouri", "rainman", "itsascam", "steemroller", "hello", "lxcteem", "steemit", "idol", "bittrexrichie", "testzcrypto", "moon", "drsteem", "afew", "phantas", "healthcare", "felekas1", "abka", "neonminer", "silkroad", "signalandnoise", "stephanie", "stesting1", "drifter1", "support1", "alittle", "zisis1", "miltos1"] if __name__ == '__main__': # Let's find out how often blocks are generated! config = rpc.get_config() block_interval = config["STEEMIT_BLOCK_INTERVAL"] # We are going to loop indefinitely #Initialize count to store blocks produced for each witness count={} for witness in watch_accounts: count[witness] = 0 while True: # Get chain properies to identify the # head/last reversible block props = rpc.get_dynamic_global_properties() # Get block number
process_transfer(op, block, blockid) def process_transfer(op, block, blockid): """ We here process the actual transfer operation. """ if op["to"] == watch_account: print("%d | %s | %s -> %s: %s -- %s" % (blockid, block["timestamp"], op["from"], op["to"], op["amount"], op["memo"])) if __name__ == '__main__': # Let's find out how often blocks are generated! config = rpc.get_config() block_interval = config["STEEMIT_BLOCK_INTERVAL"] # We are going to loop indefinitely while True: # Get chain properies to identify the # head/last reversible block props = rpc.get_dynamic_global_properties() # Get block number # We here have the choice between # * head_block_number: the last block # * last_irreversible_block_num: the block that is confirmed by # 2/3 of all block producers and is thus irreversible! # We recommend to use the latter!