Created
July 15, 2019 09:38
-
-
Save BlackTurtle123/8744def3bf5ec9bd69208e600ffd0905 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pywaves as pw | |
import time | |
pw.setNode('https://apitnetworktest.blackturtle.eu','Turtle Network','l') | |
block = pw.lastblock() | |
addr = pw.Address(seed='seeeeeeeeedddddd heeeeeerrrrreeeeeeee') | |
while True: | |
try: | |
while block['height'] == pw.lastblock()['height']: | |
time.sleep(2) | |
block = pw.lastblock() | |
print(str(block['generator'])) | |
print(str(block['height'])) | |
print(str(addr.sendWaves(pw.Address(address=block['generator']),4200,attachment='Thanks for running a node',txFee=2000000))) | |
except: | |
time.sleep(2) | |
print("except") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment