Skip to content

Commit 9035f13

Browse files
Merge pull request #346 from andkononykhin/rc-3.2
Rc 3.2. Added missing commits: 58d6b4e and d77f9b6
2 parents 42c801a + b80fd6c commit 9035f13

File tree

11 files changed

+21
-14
lines changed

11 files changed

+21
-14
lines changed

Diff for: scripts/add_keys.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async def ensureConnectedToNodes(client):
100100

101101

102102
def addNyms():
103-
with Looper(debug=True) as looper:
103+
with Looper(debug=getConfig().LOOPER_DEBUG) as looper:
104104

105105
from sovrin_client.test.helper import createNym
106106

Diff for: scripts/add_new_node

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ from sovrin_common.config_util import getConfig
1010
# TODO: This code is obsolete, moreover we have a CLI command for this.
1111

1212

13-
looper = Looper(debug=True)
13+
looper = Looper(debug=getConfig().LOOPER_DEBUG)
1414

1515
config = getConfig()
1616
basedirpath = config.baseDir

Diff for: scripts/change_node_ha

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def getHA(s):
4545
if __name__ == '__main__':
4646
args = parseArgs()
4747
config = getConfig()
48-
with Looper(debug=True) as looper:
48+
with Looper(debug=config.LOOPER_DEBUG) as looper:
4949
client, req = changeHA(looper,
5050
config,
5151
args.nodeName,

Diff for: scripts/load.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from stp_core.network.port_dispenser import genHa, HA
1010
from stp_core.loop.looper import Looper
1111
from plenum.test.helper import waitForSufficientRepliesForRequests
12+
from sovrin_common.config_util import getConfig
1213

1314
numReqs = 100
1415
splits = 1
@@ -36,7 +37,7 @@ def put_load():
3637
wallet.addIdentifier(
3738
signer=DidSigner(seed=b'000000000000000000000000Steward1'))
3839
client = Client(name, ha=ha)
39-
with Looper(debug=True) as looper:
40+
with Looper(debug=getConfig().LOOPER_DEBUG) as looper:
4041
looper.add(client)
4142
print('Will send {} reqs in all'.format(numReqs))
4243
requests = sendRandomRequests(wallet, client, numReqs)

Diff for: scripts/load_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def buildCoros(coroFunc, corosArgs):
392392
clientPoll = ClientPoll(args.clientsListFilePath,
393393
args.numberOfClients, args.numberOfClientsToSkip)
394394

395-
with Looper(debug=True) as looper:
395+
with Looper() as looper:
396396

397397
# connect
398398

Diff for: scripts/sovrin

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def run_cli():
4444

4545
withNode = True if '--with-node' in commands else False
4646

47-
with Looper(debug=False) as looper:
47+
with Looper(debug=config.LOOPER_DEBUG) as looper:
4848
curDir = os.getcwd()
4949
logFilePath = os.path.join(curDir, config.logFilePath)
5050
cli = SovrinCli(looper=looper,

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def run(self):
8787
data_files=[(
8888
(BASE_DIR, ['data/nssm_original.exe'])
8989
)],
90-
install_requires=['indy-plenum==1.1.26',
90+
install_requires=['indy-plenum==1.1.27',
9191
'indy-anoncreds==1.0.10',
9292
'python-dateutil',
9393
'timeout-decorator'],

Diff for: sovrin_client/agent/run_agent.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from plenum.common.exceptions import NoConsensusYet
55
from stp_core.common.log import getlogger
66
from sovrin_client.agent.agent_cli import AgentCli
7+
from sovrin_common.config_util import getConfig
78

89
from stp_core.loop.looper import Looper
910

@@ -50,7 +51,7 @@ def run(looper):
5051
if looper:
5152
run(looper)
5253
else:
53-
with Looper(debug=False) as looper:
54+
with Looper(debug=config.LOOPER_DEBUG) as looper:
5455
run(looper)
5556

5657

@@ -67,7 +68,7 @@ def do_run(looper):
6768
if looper:
6869
do_run(looper)
6970
else:
70-
with Looper(debug=True, loop=agent.loop) as looper:
71+
with Looper(debug=getConfig().LOOPER_DEBUG, loop=agent.loop) as looper:
7172
do_run(looper)
7273
looper.run()
7374

Diff for: sovrin_client/utils/user_scenarios.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from sovrin_client.client.client import Client
1717
from sovrin_client.client.wallet.wallet import Wallet
1818
from sovrin_common.constants import NYM, GET_NYM
19+
from sovrin_common.config_util import getConfig
1920

2021
logger = getlogger()
2122

@@ -54,7 +55,7 @@ def run(self):
5455
try:
5556
self._createClientAndWallet()
5657

57-
self._looper = Looper(debug=True)
58+
self._looper = Looper(debug=getConfig().LOOPER_DEBUG)
5859
try:
5960
self._startClient()
6061
self.do()

Diff for: sovrin_node/test/replay/test_successive_batch_no_state_change.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def reset():
3232
def test_successive_batch_do_no_change_state(looper, tdirWithPoolTxns,
3333
tdirWithDomainTxnsUpdated,
3434
tconf, nodeSet,
35-
trustee, trusteeWallet):
35+
trustee, trusteeWallet, monkeypatch):
3636
"""
3737
Send 2 NYM txns in different batches such that the second batch does not
3838
change state so that state root remains same, but keep the identifier
@@ -111,9 +111,12 @@ def check_uncommitted(count):
111111
pp_seq_no_to_delay = 4
112112
for node in other_nodes:
113113
node.nodeIbStasher.delay(specific_pre_prepare)
114+
# disable requesting missing 3 phase messages. Otherwise PP delay won't work
115+
for rpl in node.replicas:
116+
monkeypatch.setattr(rpl, '_request_missing_three_phase_messages', lambda *x, **y: None)
114117

115118
# Setting the verkey to `x`, then `y` and then back to `x` but in different
116-
# batches with different with different request ids. The idea is to change
119+
# batches with different request ids. The idea is to change
117120
# state root to `t` then `t'` and then back to `t` and observe that no
118121
# errors are encountered
119122

@@ -139,8 +142,9 @@ def check_uncommitted(count):
139142
looper.run(eventually(check_uncommitted, 0))
140143

141144
check_verkey(new_idr, verkey)
145+
monkeypatch.undo()
142146

143-
# Dleay COMMITs so that IdrCache can be checked for correct
147+
# Delay COMMITs so that IdrCache can be checked for correct
144148
# number of entries
145149

146150
uncommitteds = {}

Diff for: sovrin_node/utils/node_runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def run_node(config, name, node_port, client_port):
2222

2323
from stp_core.loop.looper import Looper
2424
from sovrin_node.server.node import Node
25-
with Looper(debug=True) as looper:
25+
with Looper(debug=config.LOOPER_DEBUG) as looper:
2626
node = Node(name, nodeRegistry=None, basedirpath=config.baseDir,
2727
ha=node_ha, cliha=client_ha)
2828
looper.add(node)

0 commit comments

Comments
 (0)