169
qa/rpc-tests/nspv_client_test.py
Executable file
169
qa/rpc-tests/nspv_client_test.py
Executable file
@@ -0,0 +1,169 @@
|
||||
import sys
|
||||
sys.path.append('../../src/tui')
|
||||
|
||||
from lib import tuilib
|
||||
import unittest
|
||||
import time
|
||||
|
||||
'''
|
||||
specify chain ticker (daemon should be up), wif which will be imported and address to which you want to broadcast
|
||||
change chain parameters if needed or add a new chain to test below
|
||||
added 1 second sleep after each case to surely not face the nSPV server limitation (1 call/second)
|
||||
'''
|
||||
|
||||
wif = ''
|
||||
dest_address = ''
|
||||
amount = '0.01'
|
||||
chain = 'ILN'
|
||||
|
||||
if not wif or not dest_address:
|
||||
raise Exception("Please set test wif and address to send transactions to")
|
||||
|
||||
rpc_proxy = tuilib.def_credentials(chain)
|
||||
|
||||
chain_params = {"KMD": {
|
||||
'tx_list_address': 'RGShWG446Pv24CKzzxjA23obrzYwNbs1kA',
|
||||
'min_chain_height': 1468080,
|
||||
'notarization_height': '1468000',
|
||||
'prev_notarization_h': 1467980,
|
||||
'next_notarization_h': 1468020,
|
||||
'hdrs_proof_low': '1468100',
|
||||
'hdrs_proof_high': '1468200',
|
||||
'numhdrs_expected': 151,
|
||||
'tx_proof_id': 'f7beb36a65bc5bcbc9c8f398345aab7948160493955eb4a1f05da08c4ac3784f',
|
||||
'tx_spent_height': 1456212,
|
||||
'tx_proof_height': '1468520',
|
||||
},
|
||||
"ILN": {
|
||||
'tx_list_address': 'RUp3xudmdTtxvaRnt3oq78FJBjotXy55uu',
|
||||
'min_chain_height': 3689,
|
||||
'notarization_height': '2000',
|
||||
'prev_notarization_h': 1998,
|
||||
'next_notarization_h': 2008,
|
||||
'hdrs_proof_low': '2000',
|
||||
'hdrs_proof_high': '2100',
|
||||
'numhdrs_expected': 113,
|
||||
'tx_proof_id': '67ffe0eaecd6081de04675c492a59090b573ee78955c4e8a85b8ac0be0e8e418',
|
||||
'tx_spent_height': 2681,
|
||||
'tx_proof_height': '2690',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class TestNspvClient(unittest.TestCase):
|
||||
|
||||
def test_nspv_mempool(self):
|
||||
print("testing nspv_mempool")
|
||||
result = rpc_proxy.nspv_mempool("0", dest_address, "0")
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["address"], dest_address)
|
||||
self.assertEqual(result["isCC"], 0)
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_listtransactions(self):
|
||||
print("testing nspv_listtransactions")
|
||||
rpc_proxy.nspv_login(wif)
|
||||
result = rpc_proxy.nspv_listtransactions()
|
||||
self.assertEqual(result["result"], "success")
|
||||
time.sleep(1)
|
||||
result = rpc_proxy.nspv_listtransactions(chain_params.get(chain).get("tx_list_address"))
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["address"], chain_params.get(chain).get("tx_list_address"))
|
||||
rpc_proxy.nspv_logout()
|
||||
|
||||
def test_nspv_getinfo(self):
|
||||
print("testing nspv_getinfo")
|
||||
result = rpc_proxy.nspv_getinfo()
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertGreater(result["height"], chain_params.get(chain).get("min_chain_height"))
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_notarizations(self):
|
||||
print("testing nspv_notarizations")
|
||||
result = rpc_proxy.nspv_notarizations(chain_params.get(chain).get("notarization_height"))
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["prev"]["notarized_height"], chain_params.get(chain).get("prev_notarization_h"))
|
||||
self.assertEqual(result["next"]["notarized_height"], chain_params.get(chain).get("next_notarization_h"))
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_hdrsproof(self):
|
||||
print("testing nspv_hdrsproof")
|
||||
result = rpc_proxy.nspv_hdrsproof(chain_params.get(chain).get("hdrs_proof_low"),
|
||||
chain_params.get(chain).get("hdrs_proof_high"))
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["numhdrs"], chain_params.get(chain).get("numhdrs_expected"))
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_login(self):
|
||||
print("testing nspv_login")
|
||||
result = rpc_proxy.nspv_login(wif)
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["status"], "wif will expire in 777 seconds")
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_listunspent(self):
|
||||
print("testing nspv_listunspent")
|
||||
result = rpc_proxy.nspv_listunspent()
|
||||
self.assertEqual(result["result"], "success")
|
||||
time.sleep(1)
|
||||
result = rpc_proxy.nspv_listunspent(chain_params.get(chain).get("tx_list_address"))
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["address"], chain_params.get(chain).get("tx_list_address"))
|
||||
|
||||
def test_nspv_spend(self):
|
||||
print("testing nspv_spend")
|
||||
result = rpc_proxy.nspv_login(wif)
|
||||
result = rpc_proxy.nspv_spend(dest_address, amount)
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["vout"][0]["valueZat"], 1000000)
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_broadcast(self):
|
||||
print("testing nspv_broadcast")
|
||||
result = rpc_proxy.nspv_login(wif)
|
||||
broadcast_hex = rpc_proxy.nspv_spend(dest_address, amount)["hex"]
|
||||
time.sleep(1)
|
||||
result = rpc_proxy.nspv_broadcast(broadcast_hex)
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["retcode"], 1)
|
||||
self.assertEqual(result["expected"], result["broadcast"])
|
||||
print("Broadcast txid: " + result["broadcast"])
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_logout(self):
|
||||
print("testing nspv_logout")
|
||||
rpc_proxy.nspv_login(wif)
|
||||
time.sleep(1)
|
||||
rpc_proxy.nspv_logout()
|
||||
time.sleep(1)
|
||||
result = rpc_proxy.nspv_spend(dest_address, amount)
|
||||
self.assertEqual(result["result"], "error")
|
||||
self.assertEqual(result["error"], "wif expired")
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_spentinfo(self):
|
||||
print("testing nspv_spent_info")
|
||||
result = rpc_proxy.nspv_spentinfo(chain_params.get(chain).get("tx_proof_id"), "1")
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["spentheight"], chain_params.get(chain).get("tx_spent_height"))
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_txproof(self):
|
||||
print("testing nspv_txproof")
|
||||
result = rpc_proxy.nspv_txproof(chain_params.get(chain).get("tx_proof_id"),
|
||||
chain_params.get(chain).get("tx_proof_height"))
|
||||
self.assertEqual(result["txid"], chain_params.get(chain).get("tx_proof_id"))
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_login_timout(self):
|
||||
print("testing auto-logout in 777 seconds")
|
||||
rpc_proxy.nspv_login(wif)
|
||||
time.sleep(778)
|
||||
result = rpc_proxy.nspv_spend(dest_address, amount)
|
||||
self.assertEqual(result["result"], "error")
|
||||
self.assertEqual(result["error"], "wif expired")
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -1,114 +0,0 @@
|
||||
import sys
|
||||
sys.path.append('../../src/tui')
|
||||
|
||||
from lib import tuilib
|
||||
import unittest
|
||||
|
||||
'''
|
||||
specify chain ticker (daemon should be up), wif which will be imported and address to which you want to broadcast
|
||||
added 1 second sleep after each case to surely not face the nSPV server limitation (1 call/second)
|
||||
'''
|
||||
|
||||
wif = ''
|
||||
dest_address = 'RMjy5VkHFJkXTJDTJ3XX1zVzukP48sKyva'
|
||||
amount = '0.1'
|
||||
chain = 'ILN'
|
||||
|
||||
rpc_proxy = tuilib.def_credentials(chain)
|
||||
|
||||
|
||||
class TestNspvClient(unittest.TestCase):
|
||||
|
||||
def test_nspv_getinfo(self):
|
||||
print("testing nspv_getinfo")
|
||||
result = rpc_proxy.nspv_getinfo()
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertGreater(result["height"], 2689)
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_notarizations(self):
|
||||
print("testing nspv_notarizations")
|
||||
result = rpc_proxy.nspv_notarizations("2000")
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["prev"]["notarized_height"], 1998)
|
||||
self.assertEqual(result["next"]["notarized_height"], 2002)
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_hdrsproof(self):
|
||||
print("testing nspv_hdrsproof")
|
||||
result = rpc_proxy.nspv_hdrsproof("2000", "2100")
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["numhdrs"], 101)
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_login(self):
|
||||
print("testing nspv_login")
|
||||
result = rpc_proxy.nspv_login(wif)
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["status"], "wif will expire in 777 seconds")
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_listunspent(self):
|
||||
print("testing nspv_listunspent")
|
||||
result = rpc_proxy.nspv_listunspent()
|
||||
self.assertEqual(result["result"], "success")
|
||||
time.sleep(1)
|
||||
result = rpc_proxy.nspv_listunspent("RQ1mvCUcziWzRwE8Ugtex29VjoFjRzxQJT")
|
||||
self.assertEqual(result["result"], "error")
|
||||
|
||||
def test_nspv_spend(self):
|
||||
print("testing nspv_spend")
|
||||
result = rpc_proxy.nspv_login(wif)
|
||||
result = rpc_proxy.nspv_spend(dest_address, amount)
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["vout"][0]["valueZat"], 10000000)
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_broadcast(self):
|
||||
print("testing nspv_broadcast")
|
||||
result = rpc_proxy.nspv_login(wif)
|
||||
broadcast_hex = rpc_proxy.nspv_spend(dest_address, amount)["hex"]
|
||||
time.sleep(1)
|
||||
result = rpc_proxy.nspv_broadcast(broadcast_hex)
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["retcode"], 1)
|
||||
self.assertEqual(result["expected"], result["broadcast"])
|
||||
print("Broadcast txid: " + result["broadcast"])
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_logout(self):
|
||||
print("testing nspv_logout")
|
||||
rpc_proxy.nspv_login(wif)
|
||||
time.sleep(1)
|
||||
rpc_proxy.nspv_logout()
|
||||
time.sleep(1)
|
||||
result = rpc_proxy.nspv_spend(dest_address, amount)
|
||||
self.assertEqual(result["result"], "error")
|
||||
self.assertEqual(result["error"], "wif expired")
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_spentinfo(self):
|
||||
print("testing nspv_spent_info")
|
||||
result = rpc_proxy.nspv_spentinfo("67ffe0eaecd6081de04675c492a59090b573ee78955c4e8a85b8ac0be0e8e418", "1")
|
||||
self.assertEqual(result["result"], "success")
|
||||
self.assertEqual(result["spentheight"], 2681)
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_txproof(self):
|
||||
print("testing nspv_txproof")
|
||||
result = rpc_proxy.nspv_txproof("67ffe0eaecd6081de04675c492a59090b573ee78955c4e8a85b8ac0be0e8e418", "2673")
|
||||
self.assertEqual(result["txid"], "67ffe0eaecd6081de04675c492a59090b573ee78955c4e8a85b8ac0be0e8e418")
|
||||
time.sleep(1)
|
||||
|
||||
def test_nspv_login_timout(self):
|
||||
print("testing auto-logout in 777 seconds")
|
||||
rpc_proxy.nspv_login(wif)
|
||||
time.sleep(777)
|
||||
result = rpc_proxy.nspv_spend(dest_address, amount)
|
||||
self.assertEqual(result["result"], "error")
|
||||
self.assertEqual(result["error"], "wif expired")
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
88
src/pow.cpp
88
src/pow.cpp
@@ -42,13 +42,13 @@ uint32_t komodo_chainactive_timestamp();
|
||||
unsigned int lwmaGetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock, const Consensus::Params& params);
|
||||
unsigned int lwmaCalculateNextWorkRequired(const CBlockIndex* pindexLast, const Consensus::Params& params);
|
||||
|
||||
arith_uint256 zawy_targetMA(arith_uint256 easy,arith_uint256 bnTarget,int32_t divisor)
|
||||
arith_uint256 zawy_targetMA(arith_uint256 easy,arith_uint256 bnSum,int32_t num,int32_t numerator,int32_t divisor)
|
||||
{
|
||||
bnTarget /= arith_uint256(divisor);
|
||||
bnTarget *= arith_uint256(ASSETCHAINS_BLOCKTIME);
|
||||
if ( bnTarget > easy )
|
||||
bnTarget = easy;
|
||||
return(bnTarget);
|
||||
bnSum /= arith_uint256(ASSETCHAINS_BLOCKTIME * num * num * divisor);
|
||||
bnSum *= arith_uint256(numerator);
|
||||
if ( bnSum > easy )
|
||||
bnSum = easy;
|
||||
return(bnSum);
|
||||
}
|
||||
|
||||
arith_uint256 zawy_exponential(arith_uint256 bnTarget,int32_t mult)
|
||||
@@ -100,11 +100,12 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
|
||||
// Find the first block in the averaging interval
|
||||
const CBlockIndex* pindexFirst = pindexLast;
|
||||
arith_uint256 bnTmp,bnTarget,bnSum4 {0},bnSum7 {0},bnSum12 {0},bnTot {0};
|
||||
arith_uint256 bnTmp,bnTarget,bnPrev {0},bnSum4 {0},bnSum7 {0},bnSum12 {0},bnTot {0};
|
||||
uint32_t nbits,blocktime,block4diff=0,block7diff=0,block12diff=0; int32_t diff,mult = 0;
|
||||
if ( ASSETCHAINS_ADAPTIVEPOW > 0 && pindexFirst != 0 && pblock != 0 )
|
||||
{
|
||||
mult = pblock->nTime - pindexFirst->nTime - 7 * ASSETCHAINS_BLOCKTIME;
|
||||
bnPrev.SetCompact(pindexFirst->nBits);
|
||||
//fprintf(stderr,"ht.%d mult.%d = (%u - %u - 7x)\n",pindexLast->GetHeight(),(int32_t)mult,pblock->nTime, pindexFirst->nTime);
|
||||
}
|
||||
for (int i = 0; pindexFirst && i < params.nPowAveragingWindow; i++)
|
||||
@@ -148,15 +149,30 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
if (pindexFirst == NULL)
|
||||
return nProofOfWorkLimit;
|
||||
|
||||
bool fNegative,fOverflow; arith_uint256 easy,origtarget,bnAvg {bnTot / params.nPowAveragingWindow};
|
||||
bool fNegative,fOverflow; int32_t flag = 0; arith_uint256 easy,origtarget,bnAvg {bnTot / params.nPowAveragingWindow};
|
||||
nbits = CalculateNextWorkRequired(bnAvg, pindexLast->GetMedianTimePast(), pindexFirst->GetMedianTimePast(), params);
|
||||
if ( ASSETCHAINS_ADAPTIVEPOW > 0 )
|
||||
if ( ASSETCHAINS_ADAPTIVEPOW > 0 && block12diff != 0 && block7diff != 0 && block4diff != 0 )
|
||||
{
|
||||
origtarget = bnTarget = arith_uint256().SetCompact(nbits);
|
||||
easy.SetCompact(KOMODO_MINDIFF_NBITS,&fNegative,&fOverflow);
|
||||
if ( mult > 1 ) // chain is stuck case, jl777: test of mult > 1 failed when it was int64_t???
|
||||
bnSum4 = zawy_targetMA(easy,bnSum4,4,block4diff * 5,1);
|
||||
bnSum7 = zawy_targetMA(easy,bnSum7,7,block7diff * 3,1);
|
||||
bnSum12 = zawy_targetMA(easy,bnSum12,12,block12diff * 2,1);
|
||||
if ( bnSum4 < bnSum7 )
|
||||
bnTmp = bnSum4;
|
||||
else bnTmp = bnSum7;
|
||||
if ( bnSum12 < bnTmp )
|
||||
bnTmp = bnSum12;
|
||||
if ( bnTmp < bnTarget )
|
||||
{
|
||||
bnTarget = zawy_exponential(bnTarget,mult); //replaces: bnTarget * arith_uint256(mult * mult);
|
||||
fprintf(stderr,"ht.%d block12diff %d vs %d, make harder\n",(int32_t)pindexLast->GetHeight()+1,block12diff,ASSETCHAINS_BLOCKTIME*11);
|
||||
bnTarget = (bnTmp + bnPrev) / arith_uint256(2);
|
||||
flag = 1;
|
||||
}
|
||||
else if ( flag == 0 && mult > 1 ) // e^mult case, jl777: test of mult > 1 failed when it was int64_t???
|
||||
{
|
||||
flag = 1;
|
||||
bnTarget = zawy_exponential(bnTarget,mult);
|
||||
if ( bnTarget < origtarget || bnTarget > easy )
|
||||
{
|
||||
bnTarget = easy;
|
||||
@@ -164,45 +180,23 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
|
||||
return(KOMODO_MINDIFF_NBITS);
|
||||
} else fprintf(stderr,"cmp.%d mult.%d for ht.%d\n",mult>1,(int32_t)mult,(int32_t)pindexLast->GetHeight());
|
||||
}
|
||||
else if ( block12diff != 0 && block7diff != 0 && block4diff != 0 )
|
||||
if ( flag == 0 )
|
||||
{
|
||||
bnSum4 = zawy_targetMA(easy,bnSum4,block4diff * 5);
|
||||
bnSum7 = zawy_targetMA(easy,bnSum7,block7diff * 3);
|
||||
bnSum12 = zawy_targetMA(easy,bnSum12,block12diff * 2);
|
||||
if ( block12diff < ASSETCHAINS_BLOCKTIME*11 )
|
||||
bnSum4 = zawy_targetMA(easy,bnSum4,4,block4diff * 3,10);
|
||||
bnSum7 = zawy_targetMA(easy,bnSum7,7,block7diff * 5,10);
|
||||
bnSum12 = zawy_targetMA(easy,bnSum12,12,block12diff * 6,10);
|
||||
if ( bnSum4 > bnSum7 )
|
||||
bnTmp = bnSum4;
|
||||
else bnTmp = bnSum7;
|
||||
if ( bnSum12 > bnTmp )
|
||||
bnTmp = bnSum12;
|
||||
if ( bnTmp > bnTarget )
|
||||
{
|
||||
if ( bnSum4 < bnSum7 )
|
||||
bnTmp = bnSum4;
|
||||
else bnTmp = bnSum7;
|
||||
if ( bnSum12 < bnTmp )
|
||||
bnTmp = bnSum12;
|
||||
if ( bnTmp < bnTarget )
|
||||
{
|
||||
fprintf(stderr,"ht.%d block12diff %d < %d, make harder\n",(int32_t)pindexLast->GetHeight()+1,block12diff,ASSETCHAINS_BLOCKTIME*11);
|
||||
bnTarget = bnTmp;
|
||||
} //else fprintf(stderr,"nothing smaller\n");
|
||||
fprintf(stderr,"ht.%d block12diff %d > %d, make easier\n",(int32_t)pindexLast->GetHeight()+1,block12diff,ASSETCHAINS_BLOCKTIME*13);
|
||||
bnTarget = (bnTmp + bnPrev) / arith_uint256(2);
|
||||
flag = 1;
|
||||
}
|
||||
else if ( block12diff > ASSETCHAINS_BLOCKTIME*13 )
|
||||
{
|
||||
if ( bnSum4 > bnSum7 )
|
||||
bnTmp = bnSum4;
|
||||
else bnTmp = bnSum7;
|
||||
if ( bnSum12 > bnTmp )
|
||||
bnTmp = bnSum12;
|
||||
if ( bnTmp > bnTarget )
|
||||
{
|
||||
fprintf(stderr,"ht.%d block12diff %d > %d, make easier\n",(int32_t)pindexLast->GetHeight()+1,block12diff,ASSETCHAINS_BLOCKTIME*13);
|
||||
bnTarget = bnTmp;
|
||||
} //else fprintf(stderr,"nothing bigger\n");
|
||||
}
|
||||
/*if ( block4diff > 4 && block4diff < ASSETCHAINS_BLOCKTIME ) // for 10x and higher hashrate increases
|
||||
{
|
||||
block4diff += (2 * ASSETCHAINS_BLOCKTIME) / 3;
|
||||
bnTarget = bnTarget * arith_uint256(block4diff) / arith_uint256(ASSETCHAINS_BLOCKTIME * 2);
|
||||
fprintf(stderr,"ht.%d 4 blocks happened in %d adjust by %.4f\n",(int32_t)pindexLast->GetHeight(),block4diff-((2 * ASSETCHAINS_BLOCKTIME) / 3),(double)block4diff/(ASSETCHAINS_BLOCKTIME*2));
|
||||
}
|
||||
*/
|
||||
} // else fprintf(stderr,"null diff %d %d %d\n",block4diff,block7diff,block12diff);
|
||||
}
|
||||
nbits = bnTarget.GetCompact();
|
||||
}
|
||||
return(nbits);
|
||||
|
||||
@@ -21,6 +21,24 @@ if operating_system != 'Win64' and operating_system != 'Windows':
|
||||
import readline
|
||||
|
||||
|
||||
class CustomProxy(Proxy):
|
||||
def __init__(self,
|
||||
service_url=None,
|
||||
service_port=None,
|
||||
conf_file=None,
|
||||
timeout=3000):
|
||||
config = dict()
|
||||
if conf_file:
|
||||
config = slickrpc.ConfigObj(conf_file)
|
||||
if service_url:
|
||||
config.update(self.url_to_conf(service_url))
|
||||
if service_port:
|
||||
config.update(rpcport=service_port)
|
||||
elif not config.get('rpcport'):
|
||||
config['rpcport'] = 7771
|
||||
self.conn = self.prepare_connection(config, timeout=timeout)
|
||||
|
||||
|
||||
def colorize(string, color):
|
||||
|
||||
colors = {
|
||||
@@ -97,7 +115,7 @@ def def_credentials(chain):
|
||||
print("check "+coin_config_file)
|
||||
exit(1)
|
||||
|
||||
return(Proxy("http://%s:%s@127.0.0.1:%d"%(rpcuser, rpcpassword, int(rpcport))))
|
||||
return(CustomProxy("http://%s:%s@127.0.0.1:%d"%(rpcuser, rpcpassword, int(rpcport))))
|
||||
|
||||
|
||||
def getinfo_tui(rpc_connection):
|
||||
|
||||
Reference in New Issue
Block a user