mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
Merge #10633: doc: Fix various typos
0a5a6b9
Fixed multiple typos (Dimitris Tsapakidis)
Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
This commit is contained in:
@ -10,7 +10,7 @@ its preconditions are met, and returns appropriate errors in other cases.
|
||||
This module consists of around a dozen individual test cases implemented in the
|
||||
top-level functions named as test_<test_case_description>. The test functions
|
||||
can be disabled or reordered if needed for debugging. If new test cases are
|
||||
added in the the future, they should try to follow the same convention and not
|
||||
added in the future, they should try to follow the same convention and not
|
||||
make assumptions about execution order.
|
||||
"""
|
||||
|
||||
|
@ -318,7 +318,7 @@ class PruneTest(BitcoinTestFramework):
|
||||
self.nodes[2] = self.start_node(2, self.options.tmpdir, ["-prune=550"])
|
||||
self.log.info("Success")
|
||||
|
||||
# check that wallet loads loads successfully when restarting a pruned node after IBD.
|
||||
# check that wallet loads successfully when restarting a pruned node after IBD.
|
||||
# this was reported to fail in #7494.
|
||||
self.log.info("Syncing node 5 to test wallet")
|
||||
connect_nodes(self.nodes[0], 5)
|
||||
|
@ -82,9 +82,9 @@ class RESTTest (BitcoinTestFramework):
|
||||
n = vout['n']
|
||||
|
||||
|
||||
######################################
|
||||
# GETUTXOS: query a unspent outpoint #
|
||||
######################################
|
||||
#######################################
|
||||
# GETUTXOS: query an unspent outpoint #
|
||||
#######################################
|
||||
json_request = '/checkmempool/'+txid+'-'+str(n)
|
||||
json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
|
||||
json_obj = json.loads(json_string)
|
||||
@ -97,9 +97,9 @@ class RESTTest (BitcoinTestFramework):
|
||||
assert_equal(json_obj['utxos'][0]['value'], 0.1)
|
||||
|
||||
|
||||
################################################
|
||||
# GETUTXOS: now query a already spent outpoint #
|
||||
################################################
|
||||
#################################################
|
||||
# GETUTXOS: now query an already spent outpoint #
|
||||
#################################################
|
||||
json_request = '/checkmempool/'+vintx+'-0'
|
||||
json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
|
||||
json_obj = json.loads(json_string)
|
||||
@ -161,24 +161,24 @@ class RESTTest (BitcoinTestFramework):
|
||||
json_request = '/'+txid+'-'+str(n)
|
||||
json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
|
||||
json_obj = json.loads(json_string)
|
||||
assert_equal(len(json_obj['utxos']), 0) #there should be a outpoint because it has just added to the mempool
|
||||
assert_equal(len(json_obj['utxos']), 0) #there should be an outpoint because it has just added to the mempool
|
||||
|
||||
json_request = '/checkmempool/'+txid+'-'+str(n)
|
||||
json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
|
||||
json_obj = json.loads(json_string)
|
||||
assert_equal(len(json_obj['utxos']), 1) #there should be a outpoint because it has just added to the mempool
|
||||
assert_equal(len(json_obj['utxos']), 1) #there should be an outpoint because it has just added to the mempool
|
||||
|
||||
#do some invalid requests
|
||||
json_request = '{"checkmempool'
|
||||
response = http_post_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
|
||||
assert_equal(response.status, 400) #must be a 400 because we send a invalid json request
|
||||
assert_equal(response.status, 400) #must be a 400 because we send an invalid json request
|
||||
|
||||
json_request = '{"checkmempool'
|
||||
response = http_post_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'bin', json_request, True)
|
||||
assert_equal(response.status, 400) #must be a 400 because we send a invalid bin request
|
||||
assert_equal(response.status, 400) #must be a 400 because we send an invalid bin request
|
||||
|
||||
response = http_post_call(url.hostname, url.port, '/rest/getutxos/checkmempool'+self.FORMAT_SEPARATOR+'bin', '', True)
|
||||
assert_equal(response.status, 400) #must be a 400 because we send a invalid bin request
|
||||
assert_equal(response.status, 400) #must be a 400 because we send an invalid bin request
|
||||
|
||||
#test limits
|
||||
json_request = '/checkmempool/'
|
||||
|
@ -10,7 +10,7 @@ from test_framework.script import CScript, OP_1, OP_DROP, OP_2, OP_HASH160, OP_E
|
||||
from test_framework.mininode import CTransaction, CTxIn, CTxOut, COutPoint, ToHex, COIN
|
||||
|
||||
# Construct 2 trivial P2SH's and the ScriptSigs that spend them
|
||||
# So we can create many many transactions without needing to spend
|
||||
# So we can create many transactions without needing to spend
|
||||
# time signing.
|
||||
redeem_script_1 = CScript([OP_1, OP_DROP])
|
||||
redeem_script_2 = CScript([OP_2, OP_DROP])
|
||||
|
@ -61,7 +61,7 @@ mininode_socket_map = dict()
|
||||
|
||||
# One lock for synchronizing all data access between the networking thread (see
|
||||
# NetworkThread below) and the thread running the test logic. For simplicity,
|
||||
# NodeConn acquires this lock whenever delivering a message to to a NodeConnCB,
|
||||
# NodeConn acquires this lock whenever delivering a message to a NodeConnCB,
|
||||
# and whenever adding anything to the send buffer (in send_message()). This
|
||||
# lock should be acquired in the thread running the test logic to synchronize
|
||||
# access to any data shared with the NodeConnCB or NodeConn.
|
||||
|
@ -70,7 +70,7 @@ class ZapWalletTXesTest (BitcoinTestFramework):
|
||||
self.nodes[0] = self.start_node(0,self.options.tmpdir, ["-zapwallettxes=1"])
|
||||
|
||||
assert_raises(JSONRPCException, self.nodes[0].gettransaction, [txid3])
|
||||
#there must be a expection because the unconfirmed wallettx0 must be gone by now
|
||||
#there must be an exception because the unconfirmed wallettx0 must be gone by now
|
||||
|
||||
tx0 = self.nodes[0].gettransaction(txid0)
|
||||
assert_equal(tx0['txid'], txid0) #tx0 (confirmed) must still be available because it was confirmed
|
||||
|
Reference in New Issue
Block a user