diff options
| author | Ross Nicoll <[email protected]> | 2018-01-20 17:56:53 +0000 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2018-09-19 22:11:47 +0100 |
| commit | b6b5ee7502bf646bcd97a9f8fe1b0b8d78e3c9ae (patch) | |
| tree | 0d36b3a80575ee685b4760a3cd1e4fa6f7223e4a /qa/rpc-tests/receivedby.py | |
| parent | Replace HMAC_SHA256 with Bitcoin's version (#1438) (diff) | |
| download | discoin-b6b5ee7502bf646bcd97a9f8fe1b0b8d78e3c9ae.tar.xz discoin-b6b5ee7502bf646bcd97a9f8fe1b0b8d78e3c9ae.zip | |
Update RPC tests for Dogecoin (#1431)
* Make most of the RPC tests pass
* Add AUXPoW rpc tests
- Tests the auxpow rpc interface `getauxblock`
- Tests consensus constraints for auxpow:
- Minimum block height
- Valid scrypt proof of work
- Foreign chain ID
Diffstat (limited to 'qa/rpc-tests/receivedby.py')
| -rwxr-xr-x | qa/rpc-tests/receivedby.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py index 1b90b2333..7b8777115 100755 --- a/qa/rpc-tests/receivedby.py +++ b/qa/rpc-tests/receivedby.py @@ -42,7 +42,7 @@ class ReceivedByTest(BitcoinTestFramework): ''' # Send from node 0 to 1 addr = self.nodes[1].getnewaddress() - txid = self.nodes[0].sendtoaddress(addr, 0.1) + txid = self.nodes[0].sendtoaddress(addr, 1) self.sync_all() #Check not listed in listreceivedbyaddress because has 0 confirmations @@ -55,11 +55,11 @@ class ReceivedByTest(BitcoinTestFramework): self.sync_all() assert_array_result(self.nodes[1].listreceivedbyaddress(), {"address":addr}, - {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]}) + {"address":addr, "account":"", "amount":Decimal("1.0"), "confirmations":10, "txids":[txid,]}) #With min confidence < 10 assert_array_result(self.nodes[1].listreceivedbyaddress(5), {"address":addr}, - {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]}) + {"address":addr, "account":"", "amount":Decimal("1.0"), "confirmations":10, "txids":[txid,]}) #With min confidence > 10, should not find Tx assert_array_result(self.nodes[1].listreceivedbyaddress(11),{"address":addr},{ },True) @@ -74,7 +74,7 @@ class ReceivedByTest(BitcoinTestFramework): ''' # Send from node 0 to 1 addr = self.nodes[1].getnewaddress() - txid = self.nodes[0].sendtoaddress(addr, 0.1) + txid = self.nodes[0].sendtoaddress(addr, 1) self.sync_all() #Check balance is 0 because of 0 confirmations @@ -84,14 +84,14 @@ class ReceivedByTest(BitcoinTestFramework): #Check balance is 0.1 balance = self.nodes[1].getreceivedbyaddress(addr,0) - if balance != Decimal("0.1"): + if balance != Decimal("1.0"): raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance)) #Bury Tx under 10 block so it will be returned by the default getreceivedbyaddress self.nodes[1].generate(10) self.sync_all() balance = self.nodes[1].getreceivedbyaddress(addr) - if balance != Decimal("0.1"): + if balance != Decimal("1.0"): raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance)) ''' @@ -105,7 +105,7 @@ class ReceivedByTest(BitcoinTestFramework): raise AssertionError("No accounts found in node") balance_by_account = self.nodes[1].getreceivedbyaccount(account) - txid = self.nodes[0].sendtoaddress(addr, 0.1) + txid = self.nodes[0].sendtoaddress(addr, 1) self.sync_all() # listreceivedbyaccount should return received_by_account_json because of 0 confirmations @@ -123,11 +123,11 @@ class ReceivedByTest(BitcoinTestFramework): # listreceivedbyaccount should return updated account balance assert_array_result(self.nodes[1].listreceivedbyaccount(), {"account":account}, - {"account":received_by_account_json["account"], "amount":(received_by_account_json["amount"] + Decimal("0.1"))}) + {"account":received_by_account_json["account"], "amount":(received_by_account_json["amount"] + Decimal("1.0"))}) # getreceivedbyaddress should return updates balance balance = self.nodes[1].getreceivedbyaccount(account) - if balance != balance_by_account + Decimal("0.1"): + if balance != balance_by_account + Decimal("1.0"): raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance)) #Create a new account named "mynewaccount" that has a 0 balance |