mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 07:37:54 +00:00
[QA] rest.py RPC test: change setgenerate() to generate()
This commit is contained in:
parent
97ee866549
commit
6b4feb89a8
@ -34,6 +34,13 @@ Only supports JSON as output format.
|
|||||||
* verificationprogress : (numeric) estimate of verification progress [0..1]
|
* verificationprogress : (numeric) estimate of verification progress [0..1]
|
||||||
* chainwork : (string) total amount of work in active chain, in hexadecimal
|
* chainwork : (string) total amount of work in active chain, in hexadecimal
|
||||||
|
|
||||||
|
`GET /rest/getutxos`
|
||||||
|
|
||||||
|
The getutxo command allows querying of the UTXO set given a set of of outpoints.
|
||||||
|
See BIP64 for input and output serialisation:
|
||||||
|
https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki
|
||||||
|
|
||||||
|
|
||||||
Risks
|
Risks
|
||||||
-------------
|
-------------
|
||||||
Running a webbrowser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:8332/rest/tx/1234567890.json">` which might break the nodes privacy.
|
Running a webbrowser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:8332/rest/tx/1234567890.json">` which might break the nodes privacy.
|
||||||
|
@ -59,16 +59,16 @@ class RESTTest (BitcoinTestFramework):
|
|||||||
url = urlparse.urlparse(self.nodes[0].url)
|
url = urlparse.urlparse(self.nodes[0].url)
|
||||||
print "Mining blocks..."
|
print "Mining blocks..."
|
||||||
|
|
||||||
self.nodes[0].setgenerate(True, 1)
|
self.nodes[0].generate(1)
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
self.nodes[2].setgenerate(True, 100)
|
self.nodes[2].generate(100)
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
|
||||||
assert_equal(self.nodes[0].getbalance(), 50)
|
assert_equal(self.nodes[0].getbalance(), 50)
|
||||||
|
|
||||||
txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
|
txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
self.nodes[2].setgenerate(True, 1)
|
self.nodes[2].generate(1)
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
bb_hash = self.nodes[0].getbestblockhash()
|
bb_hash = self.nodes[0].getbestblockhash()
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ class RESTTest (BitcoinTestFramework):
|
|||||||
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
|
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
|
||||||
assert_equal(response.status, 200) #must be a 500 because we exceeding the limits
|
assert_equal(response.status, 200) #must be a 500 because we exceeding the limits
|
||||||
|
|
||||||
self.nodes[0].setgenerate(True, 1) #generate block to not affect upcomming tests
|
self.nodes[0].generate(1) #generate block to not affect upcomming tests
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
|
||||||
################
|
################
|
||||||
|
Loading…
Reference in New Issue
Block a user