mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-13 12:33:15 +02:00
Add files via upload
This commit is contained in:
parent
c23f65cda4
commit
2c8f7d433d
1 changed files with 48 additions and 46 deletions
|
|
@ -91,26 +91,13 @@ def lndconnectexec():
|
|||
#-----------------------------Slush--------------------------------
|
||||
|
||||
def counttxs():
|
||||
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
|
||||
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
|
||||
b = block
|
||||
a = b
|
||||
pathexec()
|
||||
clear()
|
||||
getrawmempool = " getrawmempool"
|
||||
gna = os.popen(path['bitcoincli'] + getrawmempool)
|
||||
gnaa = gna.read()
|
||||
gna1 = str(gnaa)
|
||||
d = json.loads(gna1)
|
||||
e = len(d)
|
||||
n = e / 10
|
||||
nn = n
|
||||
while True:
|
||||
x = a
|
||||
try:
|
||||
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
|
||||
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
|
||||
b = block
|
||||
a = b
|
||||
pathexec()
|
||||
clear()
|
||||
getrawmempool = " getrawmempool"
|
||||
gna = os.popen(path['bitcoincli'] + getrawmempool)
|
||||
gnaa = gna.read()
|
||||
|
|
@ -118,36 +105,51 @@ def counttxs():
|
|||
d = json.loads(gna1)
|
||||
e = len(d)
|
||||
n = e / 10
|
||||
if e > nn:
|
||||
clear()
|
||||
outputtxs = render(str(e) + " txs", colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
|
||||
print("\x1b[?25l" + outputtxs)
|
||||
shq = int(n)
|
||||
ss = str(rectangle(shq))
|
||||
qq = ss.replace("None","")
|
||||
print(f"\033[A{qq}\033[A")
|
||||
nn = e
|
||||
if b > a:
|
||||
print("\n\n\n")
|
||||
output = render(str(b), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
|
||||
print("\a\x1b[?25l" + output)
|
||||
bitcoinclient = f'{path["bitcoincli"]} getbestblockhash'
|
||||
bb = os.popen(str(bitcoinclient)).read()
|
||||
ll = bb
|
||||
bitcoinclientgetblock = f'{path["bitcoincli"]} getblock {ll}'
|
||||
qq = os.popen(bitcoinclientgetblock).read()
|
||||
yy = json.loads(qq)
|
||||
mm = yy
|
||||
outputtxs = render(str(mm['nTx']) + " txs", colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
|
||||
print("\x1b[?25l" + outputtxs)
|
||||
sh = int(mm['nTx']) / 4
|
||||
shq = int(sh)
|
||||
ss = str(rectangle(shq))
|
||||
print(ss.replace("None",""))
|
||||
t.sleep(5)
|
||||
a = b
|
||||
nn = e
|
||||
|
||||
nn = n
|
||||
while True:
|
||||
x = a
|
||||
bitcoinclient = f'{path["bitcoincli"]} getblockcount'
|
||||
block = os.popen(str(bitcoinclient)).read() # 'getblockcount' convert to string
|
||||
b = block
|
||||
pathexec()
|
||||
getrawmempool = " getrawmempool"
|
||||
gna = os.popen(path['bitcoincli'] + getrawmempool)
|
||||
gnaa = gna.read()
|
||||
gna1 = str(gnaa)
|
||||
d = json.loads(gna1)
|
||||
e = len(d)
|
||||
n = e / 10
|
||||
if e > nn:
|
||||
clear()
|
||||
outputtxs = render(str(e) + " txs", colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
|
||||
print("\x1b[?25l" + outputtxs)
|
||||
shq = int(n)
|
||||
ss = str(rectangle(shq))
|
||||
qq = ss.replace("None","")
|
||||
print(f"\033[A{qq}\033[A")
|
||||
nn = e
|
||||
if b > a:
|
||||
print("\n\n\n")
|
||||
output = render(str(b), colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
|
||||
print("\a\x1b[?25l" + output)
|
||||
bitcoinclient = f'{path["bitcoincli"]} getbestblockhash'
|
||||
bb = os.popen(str(bitcoinclient)).read()
|
||||
ll = bb
|
||||
bitcoinclientgetblock = f'{path["bitcoincli"]} getblock {ll}'
|
||||
qq = os.popen(bitcoinclientgetblock).read()
|
||||
yy = json.loads(qq)
|
||||
mm = yy
|
||||
outputtxs = render(str(mm['nTx']) + " txs", colors=[settingsClock['colorA'], settingsClock['colorB']], align='center', font='tiny')
|
||||
print("\x1b[?25l" + outputtxs)
|
||||
sh = int(mm['nTx']) / 4
|
||||
shq = int(sh)
|
||||
ss = str(rectangle(shq))
|
||||
print(ss.replace("None",""))
|
||||
t.sleep(5)
|
||||
a = b
|
||||
nn = e
|
||||
except:
|
||||
pass
|
||||
|
||||
def slDIFFConn():
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue