diff options
author | luigi1111 <luigi1111w@gmail.com> | 2020-04-21 08:54:44 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2020-04-21 08:54:44 -0500 |
commit | 4540afc51b0ef567ffe00a231bf3b3b518a415c2 (patch) | |
tree | 1d698d683c8ed16c20383b88884ecac6e4efc928 /tests/functional_tests/rpc_payment.py | |
parent | Merge pull request #6415 (diff) | |
parent | functional_tests: ensure signatures never reuse a timestamp (diff) | |
download | monero-4540afc51b0ef567ffe00a231bf3b3b518a415c2.tar.xz |
Merge pull request #6433
7326b69 functional_tests: ensure signatures never reuse a timestamp (moneromooo-monero)
082dd2c functional_tests: ensure signed timestamps are fresh (moneromooo-monero)
Diffstat (limited to 'tests/functional_tests/rpc_payment.py')
-rwxr-xr-x | tests/functional_tests/rpc_payment.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/functional_tests/rpc_payment.py b/tests/functional_tests/rpc_payment.py index 3bf995f0c..5f23c2022 100755 --- a/tests/functional_tests/rpc_payment.py +++ b/tests/functional_tests/rpc_payment.py @@ -59,12 +59,14 @@ class RPCPaymentTest(): return fields def refill_signatures(self): + self.signatures_time = time.time() + self.signatures = [] signatures = subprocess.check_output([self.make_test_signature, self.secret_key, '256']).decode('utf-8') for line in signatures.split(): self.signatures.append(line.rstrip()) def get_signature(self): - if len(self.signatures) == 0: + if len(self.signatures) == 0 or self.signatures_time + 10 < time.time(): self.refill_signatures() s = self.signatures[0] self.signatures = self.signatures[1:] |