mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 19:23:26 -03:00
Reduce variable scopes
This commit is contained in:
parent
7466a26cab
commit
6a318e48a6
3 changed files with 3 additions and 5 deletions
|
@ -139,10 +139,9 @@ bool RecentRequestsTableModel::removeRows(int row, int count, const QModelIndex
|
||||||
|
|
||||||
if(count > 0 && row >= 0 && (row+count) <= list.size())
|
if(count > 0 && row >= 0 && (row+count) <= list.size())
|
||||||
{
|
{
|
||||||
const RecentRequestEntry *rec;
|
|
||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
rec = &list[row+i];
|
const RecentRequestEntry* rec = &list[row+i];
|
||||||
if (!walletModel->saveReceiveRequest(rec->recipient.address.toStdString(), rec->id, ""))
|
if (!walletModel->saveReceiveRequest(rec->recipient.address.toStdString(), rec->id, ""))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,9 +145,9 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>&
|
||||||
for (const CMutableTransaction& tx : txns)
|
for (const CMutableTransaction& tx : txns)
|
||||||
block.vtx.push_back(MakeTransactionRef(tx));
|
block.vtx.push_back(MakeTransactionRef(tx));
|
||||||
// IncrementExtraNonce creates a valid coinbase and merkleRoot
|
// IncrementExtraNonce creates a valid coinbase and merkleRoot
|
||||||
unsigned int extraNonce = 0;
|
|
||||||
{
|
{
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
|
unsigned int extraNonce = 0;
|
||||||
IncrementExtraNonce(&block, chainActive.Tip(), extraNonce);
|
IncrementExtraNonce(&block, chainActive.Tip(), extraNonce);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -704,9 +704,8 @@ static constexpr char ExitCommand = 'X';
|
||||||
static void TestOtherProcess(fs::path dirname, std::string lockname, int fd)
|
static void TestOtherProcess(fs::path dirname, std::string lockname, int fd)
|
||||||
{
|
{
|
||||||
char ch;
|
char ch;
|
||||||
int rv;
|
|
||||||
while (true) {
|
while (true) {
|
||||||
rv = read(fd, &ch, 1); // Wait for command
|
int rv = read(fd, &ch, 1); // Wait for command
|
||||||
assert(rv == 1);
|
assert(rv == 1);
|
||||||
switch(ch) {
|
switch(ch) {
|
||||||
case LockCommand:
|
case LockCommand:
|
||||||
|
|
Loading…
Add table
Reference in a new issue