Skip to content

Instantly share code, notes, and snippets.

@BlackTurtle123
Created July 15, 2019 09:38
Show Gist options
  • Save BlackTurtle123/8744def3bf5ec9bd69208e600ffd0905 to your computer and use it in GitHub Desktop.
Save BlackTurtle123/8744def3bf5ec9bd69208e600ffd0905 to your computer and use it in GitHub Desktop.
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