Skip to content

Commit

Permalink
Trivial: typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CaveSpectre11 committed Jul 26, 2019
1 parent 9e4c357 commit c9a2cc3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, CBlockIndex* pindex
mapBlocksInFlight[hash] = std::make_pair(nodeid, it);
}

/** Check whether the last unknown block a peer advertized is not yet known. */
/** Check whether the last unknown block a peer advertised is not yet known. */
void ProcessBlockAvailability(NodeId nodeid)
{
CNodeState* state = State(nodeid);
Expand Down Expand Up @@ -6249,11 +6249,11 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
if (fListen && !IsInitialBlockDownload()) {
CAddress addr = GetLocalAddress(&pfrom->addr);
if (addr.IsRoutable()) {
LogPrintf("ProcessMessages: advertizing address %s\n", addr.ToString());
LogPrintf("ProcessMessages: advertising address %s\n", addr.ToString());
pfrom->PushAddress(addr);
} else if (IsPeerAddrLocalGood(pfrom)) {
addr.SetIP(pfrom->addrLocal);
LogPrintf("ProcessMessages: advertizing address %s\n", addr.ToString());
LogPrintf("ProcessMessages: advertising address %s\n", addr.ToString());
pfrom->PushAddress(addr);
}
}
Expand Down Expand Up @@ -7239,7 +7239,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
pnode->setAddrKnown.clear();

// Rebroadcast our address
AdvertizeLocal(pnode);
AdvertiseLocal(pnode);
}
if (!vNodes.empty())
nLastRebroadcast = GetTime();
Expand Down Expand Up @@ -7364,7 +7364,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
// In case there is a block that has been in flight from this peer for (2 + 0.5 * N) times the block interval
// (with N the number of validated blocks that were in flight at the time it was requested), disconnect due to
// timeout. We compensate for in-flight blocks to prevent killing off peers due to our own downstream link
// being saturated. We only count validated in-flight blocks so peers can't advertize nonexisting block hashes
// being saturated. We only count validated in-flight blocks so peers can't advertise nonexisting block hashes
// to unreasonably increase our timeout.
if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0 && state.vBlocksInFlight.front().nTime < nNow - 500000 * Params().TargetSpacing() * (4 + state.vBlocksInFlight.front().nValidatedQueuedBefore)) {
LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", state.vBlocksInFlight.front().hash.ToString(), pto->id);
Expand Down
4 changes: 2 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ bool IsPeerAddrLocalGood(CNode* pnode)
}

// pushes our own address to a peer
void AdvertizeLocal(CNode* pnode)
void AdvertiseLocal(CNode* pnode)
{
if (fListen && pnode->fSuccessfullyConnected) {
CAddress addrLocal = GetLocalAddress(&pnode->addr);
Expand All @@ -232,7 +232,7 @@ void AdvertizeLocal(CNode* pnode)
addrLocal.SetIP(pnode->addrLocal);
}
if (addrLocal.IsRoutable()) {
LogPrintf("AdvertizeLocal: advertizing address %s\n", addrLocal.ToString());
LogPrintf("AdvertiseLocal: advertising address %s\n", addrLocal.ToString());
pnode->PushAddress(addrLocal);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ enum {
};

bool IsPeerAddrLocalGood(CNode* pnode);
void AdvertizeLocal(CNode* pnode);
void AdvertiseLocal(CNode* pnode);
void SetLimited(enum Network net, bool fLimited = true);
bool IsLimited(enum Network net);
bool IsLimited(const CNetAddr& addr);
Expand Down
6 changes: 3 additions & 3 deletions src/rpc/budget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ UniValue preparebudget(const UniValue& params, bool fHelp)

if (fHelp || params.size() != 6)
throw std::runtime_error(
"preparebudget \"proposal-name\" \"url\" payment-count block-start \"pivx-address\" monthy-payment\n"
"preparebudget \"proposal-name\" \"url\" payment-count block-start \"pivx-address\" monthly-payment\n"
"\nPrepare proposal for network by signing and creating tx\n"

"\nArguments:\n"
Expand Down Expand Up @@ -150,7 +150,7 @@ UniValue submitbudget(const UniValue& params, bool fHelp)

if (fHelp || params.size() != 7)
throw std::runtime_error(
"submitbudget \"proposal-name\" \"url\" payment-count block-start \"pivx-address\" monthy-payment \"fee-tx\"\n"
"submitbudget \"proposal-name\" \"url\" payment-count block-start \"pivx-address\" monthly-payment \"fee-tx\"\n"
"\nSubmit proposal to the network\n"

"\nArguments:\n"
Expand Down Expand Up @@ -940,7 +940,7 @@ UniValue checkbudgets(const UniValue& params, bool fHelp)
if (fHelp || params.size() != 0)
throw std::runtime_error(
"checkbudgets\n"
"\nInitiates a buddget check cycle manually\n"
"\nInitiates a budget check cycle manually\n"

"\nExamples:\n" +
HelpExampleCli("checkbudgets", "") + HelpExampleRpc("checkbudgets", ""));
Expand Down

0 comments on commit c9a2cc3

Please sign in to comment.