mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-21 04:09:09 +02:00
Merge #12780: Reduce variable scopes
6a318e48a6 Reduce variable scopes (practicalswift)
Pull request description:
Reduce variable scopes.
Tree-SHA512: 5c7735344024cb6cd310e739886dc811a64b640a0d6aac8b3d04f49e5987d6ff6676d978890bc84f1460527d92217176a79b007f0bf6b4147c04abfec2c67714
This commit is contained in:
@@ -145,9 +145,9 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>&
|
||||
for (const CMutableTransaction& tx : txns)
|
||||
block.vtx.push_back(MakeTransactionRef(tx));
|
||||
// IncrementExtraNonce creates a valid coinbase and merkleRoot
|
||||
unsigned int extraNonce = 0;
|
||||
{
|
||||
LOCK(cs_main);
|
||||
unsigned int extraNonce = 0;
|
||||
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)
|
||||
{
|
||||
char ch;
|
||||
int rv;
|
||||
while (true) {
|
||||
rv = read(fd, &ch, 1); // Wait for command
|
||||
int rv = read(fd, &ch, 1); // Wait for command
|
||||
assert(rv == 1);
|
||||
switch(ch) {
|
||||
case LockCommand:
|
||||
|
||||
Reference in New Issue
Block a user