mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-07 13:18:43 +02:00
doc: fix various typos
Co-authored-by: Peter Yordanov <ppyordanov@yahoo.com>
This commit is contained in:
@@ -24,7 +24,7 @@ static void VerifyScriptBench(benchmark::Bench& bench)
|
||||
const int flags = SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH;
|
||||
const int witnessversion = 0;
|
||||
|
||||
// Keypair.
|
||||
// Key pair.
|
||||
CKey key;
|
||||
static const std::array<unsigned char, 32> vchKey = {
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ bool DecodeHexBlockHeader(CBlockHeader&, const std::string& hex_header);
|
||||
/**
|
||||
* Parse a hex string into 256 bits
|
||||
* @param[in] strHex a hex-formatted, 64-character string
|
||||
* @param[out] result the result of the parasing
|
||||
* @param[out] result the result of the parsing
|
||||
* @returns true if successful, false if not
|
||||
*
|
||||
* @see ParseHashV for an RPC-oriented version of this
|
||||
|
||||
@@ -128,7 +128,7 @@ static bool DecodeTx(CMutableTransaction& tx, const std::vector<unsigned char>&
|
||||
{
|
||||
// General strategy:
|
||||
// - Decode both with extended serialization (which interprets the 0x0001 tag as a marker for
|
||||
// the presense of witnesses) and with legacy serialization (which interprets the tag as a
|
||||
// the presence of witnesses) and with legacy serialization (which interprets the tag as a
|
||||
// 0-input 1-output incomplete transaction).
|
||||
// - Restricted by try_no_witness (which disables legacy if false) and try_witness (which
|
||||
// disables extended if false).
|
||||
|
||||
@@ -59,7 +59,7 @@ uint256 CPartialMerkleTree::CalcHash(int height, unsigned int pos, const std::ve
|
||||
//if we do not have this assert, we can hit a memory access violation when indexing into vTxid
|
||||
assert(vTxid.size() != 0);
|
||||
if (height == 0) {
|
||||
// hash at height 0 is the txids themself
|
||||
// hash at height 0 is the txids themselves
|
||||
return vTxid[pos];
|
||||
} else {
|
||||
// calculate left hash
|
||||
|
||||
@@ -64,7 +64,7 @@ struct Peer {
|
||||
|
||||
/** Protects block inventory data members */
|
||||
Mutex m_block_inv_mutex;
|
||||
/** List of blocks that we'll anounce via an `inv` message.
|
||||
/** List of blocks that we'll announce via an `inv` message.
|
||||
* There is no final sorting before sending, as they are always sent
|
||||
* immediately and in the order requested. */
|
||||
std::vector<uint256> m_blocks_for_inv_relay GUARDED_BY(m_block_inv_mutex);
|
||||
|
||||
@@ -483,7 +483,7 @@ class CSubNet
|
||||
READWRITE(obj.network);
|
||||
if (obj.network.IsIPv4()) {
|
||||
// Before commit 102867c587f5f7954232fb8ed8e85cda78bb4d32, CSubNet used the last 4 bytes of netmask
|
||||
// to store the relevant bytes for an IPv4 mask. For compatiblity reasons, keep doing so in
|
||||
// to store the relevant bytes for an IPv4 mask. For compatibility reasons, keep doing so in
|
||||
// serialized form.
|
||||
unsigned char dummy[12] = {0};
|
||||
READWRITE(dummy);
|
||||
|
||||
@@ -127,10 +127,10 @@ void RPCNestedTests::rpcNestedTests()
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo() .\n"), std::runtime_error); //invalid syntax
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo() getblockchaininfo()"), std::runtime_error); //invalid syntax
|
||||
(RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo(")); //tolerate non closing brackets if we have no arguments
|
||||
(RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo()()()")); //tolerate non command brackts
|
||||
(RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo()()()")); //tolerate non command brackets
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo(True)"), UniValue); //invalid argument
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "a(getblockchaininfo(True))"), UniValue); //method not found
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "rpcNestedTest abc,,abc"), std::runtime_error); //don't tollerate empty arguments when using ,
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "rpcNestedTest(abc,,abc)"), std::runtime_error); //don't tollerate empty arguments when using ,
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "rpcNestedTest(abc,,)"), std::runtime_error); //don't tollerate empty arguments when using ,
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "rpcNestedTest abc,,abc"), std::runtime_error); //don't tolerate empty arguments when using ,
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "rpcNestedTest(abc,,abc)"), std::runtime_error); //don't tolerate empty arguments when using ,
|
||||
QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(m_node, result, "rpcNestedTest(abc,,)"), std::runtime_error); //don't tolerate empty arguments when using ,
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ WalletModel* WalletController::getOrCreateWallet(std::unique_ptr<interfaces::Wal
|
||||
|
||||
connect(wallet_model, &WalletModel::unload, this, [this, wallet_model] {
|
||||
// Defer removeAndDeleteWallet when no modal widget is active.
|
||||
// TODO: remove this workaround by removing usage of QDiallog::exec.
|
||||
// TODO: remove this workaround by removing usage of QDialog::exec.
|
||||
if (QApplication::activeModalWidget()) {
|
||||
connect(qApp, &QApplication::focusWindowChanged, wallet_model, [this, wallet_model]() {
|
||||
if (!QApplication::activeModalWidget()) {
|
||||
|
||||
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE(signet_parse_tests)
|
||||
CMutableTransaction cb;
|
||||
cb.vout.emplace_back(0, CScript{});
|
||||
block.vtx.push_back(MakeTransactionRef(cb));
|
||||
block.vtx.push_back(MakeTransactionRef(cb)); // Add dummy tx to excercise merkle root code
|
||||
block.vtx.push_back(MakeTransactionRef(cb)); // Add dummy tx to exercise merkle root code
|
||||
BOOST_CHECK(!SignetTxs::Create(block, challenge));
|
||||
BOOST_CHECK(!CheckSignetBlockSolution(block, signet_params->GetConsensus()));
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
explicit SQLiteBatch(SQLiteDatabase& database);
|
||||
~SQLiteBatch() override { Close(); }
|
||||
|
||||
/* No-op. See commeng on SQLiteDatabase::Flush */
|
||||
/* No-op. See comment on SQLiteDatabase::Flush */
|
||||
void Flush() override {}
|
||||
|
||||
void Close() override;
|
||||
|
||||
@@ -426,7 +426,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
|
||||
uint256 checksum;
|
||||
ssValue >> checksum;
|
||||
if ((checksum_valid = Hash(vchPrivKey) != checksum)) {
|
||||
strErr = "Error reading wallet database: Crypted key corrupt";
|
||||
strErr = "Error reading wallet database: Encrypted key corrupt";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user