Skip to content

Commit 6b4feb8

Browse files
committed
[QA] rest.py RPC test: change setgenerate() to generate()
1 parent 97ee866 commit 6b4feb8

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

doc/REST-interface.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ Only supports JSON as output format.
3434
* verificationprogress : (numeric) estimate of verification progress [0..1]
3535
* chainwork : (string) total amount of work in active chain, in hexadecimal
3636

37+
`GET /rest/getutxos`
38+
39+
The getutxo command allows querying of the UTXO set given a set of of outpoints.
40+
See BIP64 for input and output serialisation:
41+
https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki
42+
43+
3744
Risks
3845
-------------
3946
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.

qa/rpc-tests/rest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ def run_test(self):
5959
url = urlparse.urlparse(self.nodes[0].url)
6060
print "Mining blocks..."
6161

62-
self.nodes[0].setgenerate(True, 1)
62+
self.nodes[0].generate(1)
6363
self.sync_all()
64-
self.nodes[2].setgenerate(True, 100)
64+
self.nodes[2].generate(100)
6565
self.sync_all()
6666

6767
assert_equal(self.nodes[0].getbalance(), 50)
6868

6969
txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
7070
self.sync_all()
71-
self.nodes[2].setgenerate(True, 1)
71+
self.nodes[2].generate(1)
7272
self.sync_all()
7373
bb_hash = self.nodes[0].getbestblockhash()
7474

@@ -198,7 +198,7 @@ def run_test(self):
198198
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
199199
assert_equal(response.status, 200) #must be a 500 because we exceeding the limits
200200

201-
self.nodes[0].setgenerate(True, 1) #generate block to not affect upcomming tests
201+
self.nodes[0].generate(1) #generate block to not affect upcomming tests
202202
self.sync_all()
203203

204204
################

0 commit comments

Comments
 (0)