Skip to content

Commit

Permalink
put streams togeterh
Browse files Browse the repository at this point in the history
  • Loading branch information
calidion committed Oct 18, 2018
1 parent 18746f7 commit 63a5d23
Show file tree
Hide file tree
Showing 54 changed files with 74 additions and 60 deletions.
14 changes: 14 additions & 0 deletions replace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
echo "$1"
echo "$2"

if [ -z "$1" ] || [ -z "$2" ]; then
echo "please input both replacee and replacer"
else

find ./src/ -type f -exec sed -i "s/$1/$2/g" {} +
find ./include/ -type f -exec sed -i "s/$1/$2/g" {} +
find ./tests/ -type f -exec sed -i "s/$1/$2/g" {} +
fi


2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
add_definitions(-DSTATICLIB)

file(GLOB_RECURSE BlockchainExplorer BlockchainExplorer/*)
file(GLOB_RECURSE Common common/*)
file(GLOB_RECURSE Common common/* stream/*)
file(GLOB_RECURSE ConnectivityTool ConnectivityTool/*)
file(GLOB_RECURSE Crypto crypto/*)
file(GLOB_RECURSE CryptoNoteCore cryptonote/core/* CryptoNoteConfig.h)
Expand Down
2 changes: 1 addition & 1 deletion src/ComplexWallet/ComplexWallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "Wallet/WalletRpcServer.h"
#include "Wallet/LegacyKeysImporter.h"
#include "WalletLegacy/WalletHelper.h"
#include "common/StdOutputStream.h"
#include "stream/StdOutputStream.h"

#include "version.h"

Expand Down
2 changes: 1 addition & 1 deletion src/ComplexWallet/WalletFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "CryptoNoteConfig.h"
#include "WalletLegacy/KeysStorage.h"
#include "common/StringTools.h"
#include "common/StdOutputStream.h"
#include "stream/StdOutputStream.h"
#include "common/Base58.h"
#include "cryptonote/core/CryptoNoteBasicImpl.h"
#include "cryptonote/core/Currency.h"
Expand Down
4 changes: 2 additions & 2 deletions src/ComplexWallet/WalletManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include "common/ScopeExit.h"
#include "common/ShuffleGenerator.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "common/StringTools.h"
#include "cryptonote/core/Account.h"
#include "cryptonote/core/Currency.h"
Expand Down
4 changes: 2 additions & 2 deletions src/MultiWalletService/WalletInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include "common/ScopeExit.h"
#include "common/ShuffleGenerator.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "common/StringTools.h"
#include "cryptonote/core/Account.h"
#include "cryptonote/core/Currency.h"
Expand Down
4 changes: 2 additions & 2 deletions src/P2p/LevinProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#pragma once

#include "cryptonote.h"
#include <common/MemoryInputStream.h>
#include <common/VectorOutputStream.h>
#include <stream/MemoryInputStream.h>
#include <stream/VectorOutputStream.h>
#include "Serialization/KVBinaryInputStreamSerializer.h"
#include "Serialization/KVBinaryOutputStreamSerializer.h"

Expand Down
4 changes: 2 additions & 2 deletions src/P2p/NetNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include <System/TcpConnector.h>

#include "version.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "common/Util.h"
#include "crypto/crypto.h"

Expand Down
4 changes: 2 additions & 2 deletions src/P2p/P2pNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#include <System/TcpConnection.h>
#include <System/TcpConnector.h>

#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "Serialization/BinaryInputStreamSerializer.h"
#include "Serialization/BinaryOutputStreamSerializer.h"

Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/BinaryInputStreamSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <algorithm>
#include <cassert>
#include <stdexcept>
#include <common/StreamTools.h>
#include <stream/StreamTools.h>
#include "SerializationOverloads.h"

using namespace Common;
Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/BinaryInputStreamSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma once

#include <common/IInputStream.h>
#include <stream/IInputStream.h>
#include "ISerializer.h"
#include "SerializationOverloads.h"

Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/BinaryOutputStreamSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <cassert>
#include <stdexcept>
#include "common/StreamTools.h"
#include "stream/StreamTools.h"

using namespace Common;

Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/BinaryOutputStreamSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma once

#include "common/IOutputStream.h"
#include "stream/IOutputStream.h"
#include "ISerializer.h"
#include "SerializationOverloads.h"

Expand Down
8 changes: 4 additions & 4 deletions src/Serialization/BinarySerializationTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include <cryptonote.h>
#include "BinaryInputStreamSerializer.h"
#include "BinaryOutputStreamSerializer.h"
#include "common/MemoryInputStream.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "common/VectorOutputStream.h"
#include "stream/MemoryInputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "stream/VectorOutputStream.h"

#include <fstream>

Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/KVBinaryInputStreamSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <cassert>
#include <cstring>
#include <stdexcept>
#include <common/StreamTools.h>
#include <stream/StreamTools.h>
#include "KVBinaryCommon.h"

using namespace Common;
Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/KVBinaryInputStreamSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#pragma once

#include <common/IInputStream.h>
#include <stream/IInputStream.h>
#include "ISerializer.h"
#include "JsonInputValueSerializer.h"

Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/KVBinaryOutputStreamSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <cassert>
#include <stdexcept>
#include <common/StreamTools.h>
#include <stream/StreamTools.h>

using namespace Common;
using namespace cryptonote;
Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/KVBinaryOutputStreamSerializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#pragma once

#include <vector>
#include <common/IOutputStream.h>
#include <stream/IOutputStream.h>
#include "ISerializer.h"
#include "MemoryStream.h"

Expand Down
2 changes: 1 addition & 1 deletion src/Serialization/MemoryStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <cstdint>
#include <cstring> // memcpy
#include <vector>
#include <common/IOutputStream.h>
#include <stream/IOutputStream.h>

namespace cryptonote {

Expand Down
4 changes: 2 additions & 2 deletions src/Serialization/SerializationTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <list>
#include <vector>
#include <common/MemoryInputStream.h>
#include <common/StringOutputStream.h>
#include <stream/MemoryInputStream.h>
#include <stream/StringOutputStream.h>
#include "JsonInputStreamSerializer.h"
#include "JsonOutputStreamSerializer.h"
#include "KVBinaryInputStreamSerializer.h"
Expand Down
4 changes: 2 additions & 2 deletions src/Transfers/SynchronizationState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "SynchronizationState.h"

#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "Serialization/BinaryInputStreamSerializer.h"
#include "Serialization/BinaryOutputStreamSerializer.h"
#include "cryptonote/core/CryptoNoteSerialization.h"
Expand Down
4 changes: 2 additions & 2 deletions src/Transfers/TransfersContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "TransfersContainer.h"
#include "IWalletLegacy.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "cryptonote/core/CryptoNoteFormatUtils.h"
#include "Serialization/BinaryInputStreamSerializer.h"
#include "Serialization/BinaryOutputStreamSerializer.h"
Expand Down
4 changes: 2 additions & 2 deletions src/Transfers/TransfersSynchronizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "TransfersSynchronizer.h"
#include "TransfersConsumer.h"

#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "Serialization/BinaryInputStreamSerializer.h"
#include "Serialization/BinaryOutputStreamSerializer.h"

Expand Down
4 changes: 2 additions & 2 deletions src/Wallet/WalletGreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#include "common/ScopeExit.h"
#include "common/ShuffleGenerator.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "common/StringTools.h"
#include "cryptonote/core/Account.h"
#include "cryptonote/core/Currency.h"
Expand Down
6 changes: 3 additions & 3 deletions src/Wallet/WalletSerialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#include <sstream>
#include <type_traits>

#include "common/MemoryInputStream.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/MemoryInputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "cryptonote/core/CryptoNoteSerialization.h"
#include "cryptonote/core/CryptoNoteTools.h"

Expand Down
4 changes: 2 additions & 2 deletions src/Wallet/WalletSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "IWallet.h"
#include "WalletIndices.h"
#include "common/IInputStream.h"
#include "common/IOutputStream.h"
#include "stream/IInputStream.h"
#include "stream/IOutputStream.h"
#include "Transfers/TransfersSynchronizer.h"
#include "Serialization/BinaryInputStreamSerializer.h"

Expand Down
6 changes: 3 additions & 3 deletions src/WalletLegacy/WalletLegacySerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#include <stdexcept>

#include "common/MemoryInputStream.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/MemoryInputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "Serialization/BinaryOutputStreamSerializer.h"
#include "Serialization/BinaryInputStreamSerializer.h"
#include "cryptonote/core/Account.h"
Expand Down
2 changes: 1 addition & 1 deletion src/api/account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "CryptoNoteConfig.h"
// #include "WalletLegacy/KeysStorage.h"
// #include "common/StringTools.h"
// #include "common/StdOutputStream.h"
// #include "stream/StdOutputStream.h"
#include "common/Base58.h"
#include "cryptonote/core/CryptoNoteBasicImpl.h"
#include "cryptonote/core/Currency.h"
Expand Down
4 changes: 2 additions & 2 deletions src/cryptonote/core/Blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <boost/foreach.hpp>
#include "common/Math.h"
#include "common/ShuffleGenerator.h"
#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "Rpc/CoreRpcServerCommandsDefinitions.h"
#include "Serialization/BinarySerializationTools.h"
#include "CryptoNoteTools.h"
Expand Down
2 changes: 1 addition & 1 deletion src/cryptonote/core/CryptoNoteSerialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "Serialization/BinaryInputStreamSerializer.h"
#include "Serialization/BinaryOutputStreamSerializer.h"

#include "common/StringOutputStream.h"
#include "stream/StringOutputStream.h"
#include "crypto/crypto.h"

#include "Account.h"
Expand Down
4 changes: 2 additions & 2 deletions src/cryptonote/core/CryptoNoteTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#pragma once

#include <limits>
#include "common/MemoryInputStream.h"
#include "stream/MemoryInputStream.h"
#include "common/StringTools.h"
#include "common/VectorOutputStream.h"
#include "stream/VectorOutputStream.h"
#include "Serialization/BinaryOutputStreamSerializer.h"
#include "Serialization/BinaryInputStreamSerializer.h"
#include "CryptoNoteSerialization.h"
Expand Down
4 changes: 2 additions & 2 deletions src/cryptonote/core/SwappedVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include <string>
#include <vector>

#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "Serialization/BinaryInputStreamSerializer.h"
#include "Serialization/BinaryOutputStreamSerializer.h"

Expand Down
4 changes: 2 additions & 2 deletions src/cryptonote/core/TransactionExtra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "TransactionExtra.h"

#include "common/MemoryInputStream.h"
#include "common/StreamTools.h"
#include "stream/MemoryInputStream.h"
#include "stream/StreamTools.h"
#include "common/StringTools.h"
#include "CryptoNoteTools.h"
#include "Serialization/BinaryOutputStreamSerializer.h"
Expand Down
4 changes: 2 additions & 2 deletions src/cryptonote/core/blockchain/serializer/block_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include "crypto/hash.h"
#include <Logging/LoggerRef.h>
#include <Logging/ILogger.h>
#include <common/StdInputStream.h>
#include <stream/StdInputStream.h>
#include <Serialization/BinaryInputStreamSerializer.h>
#include <common/StdOutputStream.h>
#include <stream/StdOutputStream.h>
#include <Serialization/BinaryOutputStreamSerializer.h>
#include <fstream>
#include <chrono>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#include "crypto/hash.h"
#include <Logging/LoggerRef.h>
#include <Logging/ILogger.h>
#include <common/StdInputStream.h>
#include <stream/StdInputStream.h>
#include <Serialization/BinaryInputStreamSerializer.h>
#include <common/StdOutputStream.h>
#include <stream/StdOutputStream.h>
#include <Serialization/BinaryOutputStreamSerializer.h>
#include <fstream>
#include <chrono>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/UnitTests/Serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "gtest/gtest.h"

#include "common/StdInputStream.h"
#include "common/StdOutputStream.h"
#include "stream/StdInputStream.h"
#include "stream/StdOutputStream.h"
#include "Serialization/BinaryInputStreamSerializer.h"
#include "Serialization/BinaryOutputStreamSerializer.h"
#include "Serialization/BinarySerializationTools.h"
Expand Down

0 comments on commit 63a5d23

Please sign in to comment.