mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-09 22:28:51 +02:00
Fix typos
This commit is contained in:
committed by
Dimitris Apostolou
parent
00d1680498
commit
4d9b4256d8
@@ -38,7 +38,7 @@ class BaseNode(P2PInterface):
|
||||
def __init__(self):
|
||||
"""Initialize the P2PInterface
|
||||
|
||||
Used to inialize custom properties for the Node that aren't
|
||||
Used to initialize custom properties for the Node that aren't
|
||||
included by default in the base class. Be aware that the P2PInterface
|
||||
base class already stores a counter for each P2P message type and the
|
||||
last received message of each type, which should be sufficient for the
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
* Verify that getdata requests for old blocks (>1week) are dropped
|
||||
if uploadtarget has been reached.
|
||||
* Verify that getdata requests for recent blocks are respecteved even
|
||||
* Verify that getdata requests for recent blocks are respected even
|
||||
if uploadtarget has been reached.
|
||||
* Verify that the upload counters are reset after 24 hours.
|
||||
"""
|
||||
|
||||
@@ -190,8 +190,8 @@ class PruneTest(BitcoinTestFramework):
|
||||
|
||||
# Verify that we have enough history to reorg back to the fork point
|
||||
# Although this is more than 288 blocks, because this chain was written more recently
|
||||
# and only its other 299 small and 220 large block are in the block files after it,
|
||||
# its expected to still be retained
|
||||
# and only its other 299 small and 220 large blocks are in the block files after it,
|
||||
# it is expected to still be retained
|
||||
self.nodes[2].getblock(self.nodes[2].getblockhash(self.forkheight))
|
||||
|
||||
first_reorg_height = self.nodes[2].getblockcount()
|
||||
|
||||
@@ -107,7 +107,7 @@ class RESTTest (BitcoinTestFramework):
|
||||
#check chainTip response
|
||||
assert_equal(json_obj['chaintipHash'], bb_hash)
|
||||
|
||||
#make sure there is no utox in the response because this oupoint has been spent
|
||||
#make sure there is no utxo in the response because this oupoint has been spent
|
||||
assert_equal(len(json_obj['utxos']), 0)
|
||||
|
||||
#check bitmap
|
||||
|
||||
@@ -29,7 +29,7 @@ Test is as follows:
|
||||
transactions in its mempool. This tests that -persistmempool=0
|
||||
does not overwrite a previously valid mempool stored on disk.
|
||||
- Remove node0 mempool.dat and verify savemempool RPC recreates it
|
||||
and verify that node1 can load it and has 5 transaction in its
|
||||
and verify that node1 can load it and has 5 transactions in its
|
||||
mempool.
|
||||
- Verify that savemempool throws when the RPC is called if
|
||||
node1 can't write to disk.
|
||||
|
||||
@@ -124,7 +124,7 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
|
||||
assert(tx_id not in self.nodes[0].getrawmempool())
|
||||
|
||||
# This is a less than 1000-byte transaction, so just set the fee
|
||||
# to be the minimum for a 1000 byte transaction and check that it is
|
||||
# to be the minimum for a 1000-byte transaction and check that it is
|
||||
# accepted.
|
||||
self.nodes[0].prioritisetransaction(txid=tx_id, fee_delta=int(self.relayfee*COIN))
|
||||
|
||||
|
||||
@@ -548,7 +548,7 @@ class CompactBlocksTest(BitcoinTestFramework):
|
||||
# Note that it's possible for bitcoind to be smart enough to know we're
|
||||
# lying, since it could check to see if the shortid matches what we're
|
||||
# sending, and eg disconnect us for misbehavior. If that behavior
|
||||
# change were made, we could just modify this test by having a
|
||||
# change was made, we could just modify this test by having a
|
||||
# different peer provide the block further down, so that we're still
|
||||
# verifying that the block isn't marked bad permanently. This is good
|
||||
# enough for now.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
A node should never send anything other than VERSION/VERACK/REJECT until it's
|
||||
received a VERACK.
|
||||
|
||||
This test connects to a node and sends it a few messages, trying to intice it
|
||||
This test connects to a node and sends it a few messages, trying to entice it
|
||||
into sending us something it shouldn't.
|
||||
|
||||
Also test that nodes that send unsupported service bits to bitcoind are disconnected
|
||||
|
||||
@@ -64,7 +64,7 @@ class NodeNetworkLimitedTest(BitcoinTestFramework):
|
||||
blocks = self.nodes[1].generate(292)
|
||||
sync_blocks([self.nodes[0], self.nodes[1]])
|
||||
|
||||
self.log.info("Make sure we can max retrive block at tip-288.")
|
||||
self.log.info("Make sure we can max retrieve block at tip-288.")
|
||||
node.send_getdata_for_block(blocks[1]) # last block in valid range
|
||||
node.wait_for_block(int(blocks[1], 16), timeout=3)
|
||||
|
||||
|
||||
@@ -1511,7 +1511,7 @@ class SegWitTest(BitcoinTestFramework):
|
||||
# Make sure that this peer thinks segwit has activated.
|
||||
assert(get_bip9_status(self.nodes[node_id], 'segwit')['status'] == "active")
|
||||
|
||||
# Make sure this peers blocks match those of node0.
|
||||
# Make sure this peer's blocks match those of node0.
|
||||
height = self.nodes[node_id].getblockcount()
|
||||
while height >= 0:
|
||||
block_hash = self.nodes[node_id].getblockhash(height)
|
||||
|
||||
@@ -166,7 +166,7 @@ class AcceptBlockTest(BitcoinTestFramework):
|
||||
self.log.info("Unrequested more-work block accepted")
|
||||
|
||||
# 4c. Now mine 288 more blocks and deliver; all should be processed but
|
||||
# the last (height-too-high) on node (as long as its not missing any headers)
|
||||
# the last (height-too-high) on node (as long as it is not missing any headers)
|
||||
tip = block_h3
|
||||
all_blocks = []
|
||||
for i in range(288):
|
||||
|
||||
@@ -55,7 +55,7 @@ class RPCBindTest(BitcoinTestFramework):
|
||||
def run_test(self):
|
||||
# due to OS-specific network stats queries, this test works only on Linux
|
||||
if not sys.platform.startswith('linux'):
|
||||
raise SkipTest("This test can only be run on linux.")
|
||||
raise SkipTest("This test can only be run on Linux.")
|
||||
# find the first non-loopback interface for testing
|
||||
non_loopback_ip = None
|
||||
for name,ip in all_interfaces():
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Copyright (c) 2010-2017 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Bitcoin test framework primitive and message strcutures
|
||||
"""Bitcoin test framework primitive and message structures
|
||||
|
||||
CBlock, CTransaction, CBlockHeader, CTxIn, CTxOut, etc....:
|
||||
data structures that should map to corresponding structures in
|
||||
|
||||
@@ -405,7 +405,7 @@ class P2PInterface(P2PConnection):
|
||||
|
||||
|
||||
# Keep our own socket map for asyncore, so that we can track disconnects
|
||||
# ourselves (to workaround an issue with closing an asyncore socket when
|
||||
# ourselves (to work around an issue with closing an asyncore socket when
|
||||
# using select)
|
||||
mininode_socket_map = dict()
|
||||
|
||||
@@ -424,7 +424,7 @@ class NetworkThread(threading.Thread):
|
||||
def run(self):
|
||||
while mininode_socket_map:
|
||||
# We check for whether to disconnect outside of the asyncore
|
||||
# loop to workaround the behavior of asyncore when using
|
||||
# loop to work around the behavior of asyncore when using
|
||||
# select
|
||||
disconnected = []
|
||||
for fd, obj in mininode_socket_map.items():
|
||||
|
||||
@@ -335,7 +335,7 @@ class BitcoinTestFramework():
|
||||
blockchain. If the cached version of the blockchain is used without
|
||||
mocktime then the mempools will not sync due to IBD.
|
||||
|
||||
For backwared compatibility of the python scripts with previous
|
||||
For backward compatibility of the python scripts with previous
|
||||
versions of the cache, this helper function sets mocktime to Jan 1,
|
||||
2014 + (201 * 10 * 60)"""
|
||||
self.mocktime = 1388534400 + (201 * 10 * 60)
|
||||
|
||||
@@ -61,7 +61,7 @@ class TestNode():
|
||||
if extra_conf != None:
|
||||
append_config(dirname, i, extra_conf)
|
||||
# Most callers will just need to add extra args to the standard list below.
|
||||
# For those callers that need more flexibity, they can just set the args property directly.
|
||||
# For those callers that need more flexibility, they can just set the args property directly.
|
||||
# Note that common args are set in the config file (see initialize_datadir)
|
||||
self.extra_args = extra_args
|
||||
self.args = [self.binary, "-datadir=" + self.datadir, "-logtimemicros", "-debug", "-debugexclude=libevent", "-debugexclude=leveldb", "-mocktime=" + str(mocktime), "-uacomment=testnode%d" % i]
|
||||
|
||||
@@ -109,7 +109,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
||||
assert_equal(len(self.nodes[0].getrawmempool()), 0)
|
||||
assert_equal(self.nodes[0].getbalance(), balance)
|
||||
|
||||
# But if its received again then it is unabandoned
|
||||
# But if it is received again then it is unabandoned
|
||||
# And since now in mempool, the change is available
|
||||
# But its child tx remains abandoned
|
||||
self.nodes[0].sendrawtransaction(signed["hex"])
|
||||
@@ -117,7 +117,7 @@ class AbandonConflictTest(BitcoinTestFramework):
|
||||
assert_equal(newbalance, balance - Decimal("20") + Decimal("14.99998"))
|
||||
balance = newbalance
|
||||
|
||||
# Send child tx again so its unabandoned
|
||||
# Send child tx again so it is unabandoned
|
||||
self.nodes[0].sendrawtransaction(signed2["hex"])
|
||||
newbalance = self.nodes[0].getbalance()
|
||||
assert_equal(newbalance, balance - Decimal("10") - Decimal("14.99998") + Decimal("24.9996"))
|
||||
|
||||
@@ -283,7 +283,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
sync_blocks(self.nodes[0:3])
|
||||
node_2_bal += 2
|
||||
|
||||
#tx should be added to balance because after restarting the nodes tx should be broadcastet
|
||||
#tx should be added to balance because after restarting the nodes tx should be broadcast
|
||||
assert_equal(self.nodes[2].getbalance(), node_2_bal)
|
||||
|
||||
#send a tx with value in a string (PR#6380 +)
|
||||
|
||||
@@ -211,7 +211,7 @@ class ListSinceBlockTest (BitcoinTestFramework):
|
||||
1. tx1 is listed in listsinceblock.
|
||||
2. It is included in 'removed' as it was removed, even though it is now
|
||||
present in a different block.
|
||||
3. It is listed with a confirmations count of 2 (bb3, bb4), not
|
||||
3. It is listed with a confirmation count of 2 (bb3, bb4), not
|
||||
3 (aa1, aa2, aa3).
|
||||
'''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user