Skip to content

Commit

Permalink
Revert "Optimizations"
Browse files Browse the repository at this point in the history
This reverts commit 063d001.
  • Loading branch information
aivve committed Jul 26, 2018
1 parent 080090d commit c695830
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/System/TcpStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ bool TcpStreambuf::dumpBuffer(bool finalize) {
} else {
if(!finalize) {
size_t front = 0;
size_t pos = transferred;
for (uint64_t i = count - transferred; i--; ) {
++pos, ++front;
for (size_t pos = transferred; pos < count; ++pos, ++front) {
writeBuf[front] = writeBuf[pos];
}

Expand Down
4 changes: 1 addition & 3 deletions src/Transfers/TransfersConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ bool TransfersConsumer::onNewBlocks(const CompleteBlock* blocks, uint32_t startH
std::atomic<bool> stopProcessing(false);

auto pushingThread = std::async(std::launch::async, [&] {
uint32_t i = 0;
for (uint32_t j = count - 1; j--; ) {
for( uint32_t i = 0; i < count && !stopProcessing; ++i) {
const auto& block = blocks[i].block;

if (!block.is_initialized()) {
Expand Down Expand Up @@ -239,7 +238,6 @@ bool TransfersConsumer::onNewBlocks(const CompleteBlock* blocks, uint32_t startH
inputQueue.push(item);
++blockInfo.transactionIndex;
}
i++;
}

inputQueue.close();
Expand Down

1 comment on commit c695830

@aivve
Copy link
Collaborator Author

@aivve aivve commented on c695830 Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks compatibility with GUI2 and Lite wallets, therefore, is reverted.

Please sign in to comment.