diff --git a/python/tests/test_period.py b/python/tests/test_period.py index aa72da9..53c9d24 100644 --- a/python/tests/test_period.py +++ b/python/tests/test_period.py @@ -146,6 +146,21 @@ class TestPeriod(TestDemurrageDefault): balance = c.parse_balance_of(r) self.assertEqual(balance, 0) + nonce_oracle = RPCNonceOracle(self.accounts[5], self.rpc) + c = TxFactory(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) + enc = ABIContractEncoder() + enc.method('setSinkAddress') + enc.typ(ABIContractType.ADDRESS) + enc.address(self.accounts[3]) + data = enc.get() + o = c.template(self.accounts[5], self.address, use_nonce=True) + o = c.set_code(o, data) + (tx_hash, o) = c.finalize(o, TxFormat.JSONRPC) + r = self.rpc.do(o) + o = receipt(tx_hash) + r = self.rpc.do(o) + self.assertEqual(r['status'], 0) + nonce_oracle = RPCNonceOracle(self.accounts[0], self.rpc) c = TxFactory(self.chain_spec, signer=self.signer, nonce_oracle=nonce_oracle) enc = ABIContractEncoder() @@ -157,7 +172,6 @@ class TestPeriod(TestDemurrageDefault): o = c.set_code(o, data) (tx_hash, o) = c.finalize(o, TxFormat.JSONRPC) r = self.rpc.do(o) - o = receipt(tx_hash) r = self.rpc.do(o) self.assertEqual(r['status'], 1)