Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #258

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/jsonrpcinstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ git clone --recursive https://github.com/igroman787/mtc-jsonrpc.git

# Прописать автозагрузку
echo -e "${COLOR}[3/4]${ENDC} Add to startup"
cmd="from sys import path; path.append('/usr/src/mytonctrl/'); from mypylib.mypylib import *; Add2Systemd(name='mtc-jsonrpc', user='${user}', start='/usr/bin/python3 /usr/src/mtc-jsonrpc/mtc-jsonrpc.py')"
cmd="from sys import path; path.append('/usr/src/mytonctrl/'); from mypylib.mypylib import *; add2systemd(name='mtc-jsonrpc', user='${user}', start='/usr/bin/python3 /usr/src/mtc-jsonrpc/mtc-jsonrpc.py')"
python3 -c "${cmd}"
systemctl restart mtc-jsonrpc

Expand Down
2 changes: 1 addition & 1 deletion scripts/pytonv3installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cd /usr/bin/ton && make tonlibjson

# Прописать автозагрузку
echo -e "${COLOR}[3/4]${ENDC} Add to startup"
cmd="from sys import path; path.append('/usr/src/mytonctrl/'); from mypylib.mypylib import *; Add2Systemd(name='pytonv3', user='${user}', workdir='/usr/src/pytonv3', start='/usr/bin/python3 -m pyTON --liteserverconfig /usr/bin/ton/local.config.json --libtonlibjson /usr/bin/ton/tonlib/libtonlibjson.so')"
cmd="from sys import path; path.append('/usr/src/mytonctrl/'); from mypylib.mypylib import *; add2systemd(name='pytonv3', user='${user}', workdir='/usr/src/pytonv3', start='/usr/bin/python3 -m pyTON --liteserverconfig /usr/bin/ton/local.config.json --libtonlibjson /usr/bin/ton/tonlib/libtonlibjson.so')"
python3 -c "${cmd}"
systemctl restart pytonv3

Expand Down
10 changes: 5 additions & 5 deletions tests/bounce.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def Init():

# Check tests wallet balance
account = ton.GetAccount(testsWallet.addr)
local.AddLog("wallet: {addr}, status: {status}, balance: {balance}".format(addr=testsWallet.addr, status=account.status, balance=account.balance))
local.add_log("wallet: {addr}, status: {status}, balance: {balance}".format(addr=testsWallet.addr, status=account.status, balance=account.balance))
if account.balance == 0:
raise Exception(testsWallet.name + " wallet balance is empty.")
if account.status == "uninit":
Expand Down Expand Up @@ -50,7 +50,7 @@ def Init():
buff_wallet = wallet
buff_wallet.oldseqno = ton.GetSeqno(wallet)
ton.MoveCoinsFromHW(wallet, [[testsWallet.addr, need]], wait=False)
Local.AddLog(testsWallet.name + " <<< " + str(wallet.subwallet))
Local.add_log(testsWallet.name + " <<< " + str(wallet.subwallet))
if buff_wallet:
ton.WaitTransaction(buff_wallet)
#end for
Expand All @@ -63,7 +63,7 @@ def Init():
if wallet.account.status == "uninit":
wallet.oldseqno = ton.GetSeqno(wallet)
ton.SendFile(wallet.bocFilePath)
Local.AddLog(str(wallet.subwallet) + " - OK")
Local.add_log(str(wallet.subwallet) + " - OK")
ton.WaitTransaction(wallets[-1])
#end define

Expand All @@ -74,7 +74,7 @@ def Work():
for wallet in wallets:
wallet.oldseqno = ton.GetSeqno(wallet)
ton.MoveCoinsFromHW(wallet, destList, wait=False)
Local.AddLog(str(wallet.subwallet) + " " + wallet.addr + " >>> ")
Local.add_log(str(wallet.subwallet) + " " + wallet.addr + " >>> ")
ton.WaitTransaction(wallets[-1])
#end define

Expand All @@ -83,7 +83,7 @@ def General():
while True:
time.sleep(1)
Work()
Local.AddLog("Work - OK")
Local.add_log("Work - OK")
#end while
#end define

Expand Down
2 changes: 1 addition & 1 deletion tests/mg.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def TestMoveCoins(wallet, dest, coins, **kwargs):
ton.MoveCoins(wallet, dest, coins, timeout=600, **kwargs)
end = time.time()
diff = int(end - start)
local.AddLog(f"{wallet.addrB64} -> {dest}, diff: {diff}")
local.add_log(f"{wallet.addrB64} -> {dest}, diff: {diff}")
#end define

def Init():
Expand Down
10 changes: 5 additions & 5 deletions tests/tpsLoad.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def Init():

# Check tests wallet balance
account = ton.GetAccount(testsWallet.addr)
local.AddLog("wallet: {addr}, status: {status}, balance: {balance}".format(addr=testsWallet.addr, status=account.status, balance=account.balance))
local.add_log("wallet: {addr}, status: {status}, balance: {balance}".format(addr=testsWallet.addr, status=account.status, balance=account.balance))
if account.balance == 0:
raise Exception(testsWallet.name + " wallet balance is empty.")
if account.status == "uninit":
Expand Down Expand Up @@ -50,7 +50,7 @@ def Init():
buff_wallet = wallet
buff_wallet.oldseqno = ton.GetSeqno(wallet)
ton.MoveGrams(wallet, testsWallet.addr, need, wait=False)
Local.AddLog(testsWallet.name + " <<< " + wallet.name)
Local.add_log(testsWallet.name + " <<< " + wallet.name)
if buff_wallet:
ton.WaitTransaction(buff_wallet, False)
#end for
Expand All @@ -63,7 +63,7 @@ def Init():
if wallet.account.status == "uninit":
wallet.oldseqno = ton.GetSeqno(wallet)
ton.SendFile(wallet.bocFilePath)
Local.AddLog(str(wallet.subwallet) + " - OK")
Local.add_log(str(wallet.subwallet) + " - OK")
ton.WaitTransaction(wallets[-1])
#end define

Expand All @@ -78,7 +78,7 @@ def Work():
wallet2 = wallets[i+1]
wallet1.oldseqno = ton.GetSeqno(wallet1)
ton.MoveGrams(wallet1, wallet2.addr, 3.14, wait=False)
Local.AddLog(wallet1.name + " >>> " + wallet2.name)
Local.add_log(wallet1.name + " >>> " + wallet2.name)
ton.WaitTransaction(wallets[-1])
#end define

Expand All @@ -87,7 +87,7 @@ def General():
while True:
time.sleep(1)
Work()
Local.AddLog("Work - OK")
Local.add_log("Work - OK")
#end while
#end define

Expand Down
10 changes: 5 additions & 5 deletions tests/tpsLoad2.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def Init():

# Check tests wallet balance
account = ton.GetAccount(testsWallet.addr)
local.AddLog("wallet: {addr}, status: {status}, balance: {balance}".format(addr=testsWallet.addr, status=account.status, balance=account.balance))
local.add_log("wallet: {addr}, status: {status}, balance: {balance}".format(addr=testsWallet.addr, status=account.status, balance=account.balance))
if account.balance == 0:
raise Exception(testsWallet.name + " wallet balance is empty.")
if account.status == "uninit":
Expand Down Expand Up @@ -50,7 +50,7 @@ def Init():
buff_wallet = wallet
buff_wallet.oldseqno = ton.GetSeqno(wallet)
ton.MoveGramsFromHW(wallet, [[testsWallet.addr, need]], wait=False)
Local.AddLog(testsWallet.name + " <<< " + str(wallet.subwallet))
Local.add_log(testsWallet.name + " <<< " + str(wallet.subwallet))
if buff_wallet:
ton.WaitTransaction(buff_wallet)
#end for
Expand All @@ -63,7 +63,7 @@ def Init():
if wallet.account.status == "uninit":
wallet.oldseqno = ton.GetSeqno(wallet)
ton.SendFile(wallet.bocFilePath)
Local.AddLog(str(wallet.subwallet) + " - OK")
Local.add_log(str(wallet.subwallet) + " - OK")
ton.WaitTransaction(wallets[-1])
#end define

Expand All @@ -75,7 +75,7 @@ def Work():
for wallet in wallets:
wallet.oldseqno = ton.GetSeqno(wallet)
ton.MoveGramsFromHW(wallet, destList, wait=False)
Local.AddLog(str(wallet.subwallet) + " " + wallet.addr + " >>> ")
Local.add_log(str(wallet.subwallet) + " " + wallet.addr + " >>> ")
ton.WaitTransaction(wallets[-1])
#end define

Expand All @@ -84,7 +84,7 @@ def General():
while True:
time.sleep(1)
Work()
Local.AddLog("Work - OK")
Local.add_log("Work - OK")
#end while
#end define

Expand Down