Skip to content

Commit

Permalink
Bytecoin v.2.0.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Juarez committed Jan 9, 2017
1 parent 5c8a153 commit d56f1c5
Show file tree
Hide file tree
Showing 659 changed files with 995 additions and 684 deletions.
4 changes: 4 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Release notes 2.0.1

- Bytecoin RPC Wallet API improvements

Release notes 2.0.0

- Completely revamped CryptoNote core
Expand Down
2 changes: 1 addition & 1 deletion include/BlockchainExplorerData.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
7 changes: 5 additions & 2 deletions include/CryptoNote.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down Expand Up @@ -69,13 +69,16 @@ struct Transaction : public TransactionPrefix {
std::vector<std::vector<Crypto::Signature>> signatures;
};

struct BaseTransaction : public TransactionPrefix {
};

struct ParentBlock {
uint8_t majorVersion;
uint8_t minorVersion;
Crypto::Hash previousBlockHash;
uint16_t transactionCount;
std::vector<Crypto::Hash> baseTransactionBranch;
Transaction baseTransaction;
BaseTransaction baseTransaction;
std::vector<Crypto::Hash> blockchainBranch;
};

Expand Down
2 changes: 1 addition & 1 deletion include/CryptoTypes.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/IBlockchainExplorer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/IDataBase.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/INode.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/IObservable.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/IReadBatch.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/IStreamSerializable.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/ITransaction.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/ITransfersContainer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/ITransfersSynchronizer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
3 changes: 2 additions & 1 deletion include/IWallet.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down Expand Up @@ -150,6 +150,7 @@ class IWallet {
virtual std::string createAddress() = 0;
virtual std::string createAddress(const Crypto::SecretKey& spendSecretKey) = 0;
virtual std::string createAddress(const Crypto::PublicKey& spendPublicKey) = 0;
virtual std::vector<std::string> createAddressList(const std::vector<Crypto::SecretKey>& spendSecretKeys) = 0;
virtual void deleteAddress(const std::string& address) = 0;

virtual uint64_t getActualBalance() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/IWalletLegacy.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion include/IWriteBatch.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/BlockchainExplorer/BlockchainExplorer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/BlockchainExplorer/BlockchainExplorer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/BlockchainExplorer/BlockchainExplorerErrors.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/BlockchainExplorer/BlockchainExplorerErrors.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ArrayRef.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ArrayView.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Base58.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Base58.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/BlockingQueue.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/BlockingQueue.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/CommandLine.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/CommandLine.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ConsoleHandler.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ConsoleHandler.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ConsoleTools.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ConsoleTools.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/FileMappedVector.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
32 changes: 27 additions & 5 deletions src/Common/FileMappedVector.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down Expand Up @@ -276,6 +276,9 @@ class FileMappedVector : public EnableIfPod<T>::type {
void push_back(const T& val);
void swap(FileMappedVector& other);

bool getAutoFlush() const;
void setAutoFlush(bool autoFlush);

void flush();

const uint8_t* prefix() const;
Expand All @@ -299,6 +302,7 @@ class FileMappedVector : public EnableIfPod<T>::type {
System::MemoryMappedFile m_file;
uint64_t m_prefixSize;
uint64_t m_suffixSize;
bool m_autoFlush;

private:
template<class F>
Expand Down Expand Up @@ -329,11 +333,15 @@ class FileMappedVector : public EnableIfPod<T>::type {
};

template<class T>
FileMappedVector<T>::FileMappedVector() {
FileMappedVector<T>::FileMappedVector() :
m_autoFlush(true)
{
}

template<class T>
FileMappedVector<T>::FileMappedVector(const std::string& path, FileMappedVectorOpenMode mode, uint64_t prefixSize) {
FileMappedVector<T>::FileMappedVector(const std::string& path, FileMappedVectorOpenMode mode, uint64_t prefixSize) :
m_autoFlush(true)
{
open(path, mode, prefixSize);
}

Expand Down Expand Up @@ -653,6 +661,16 @@ void FileMappedVector<T>::swap(FileMappedVector& other) {
std::swap(m_suffixSize, other.m_suffixSize);
}

template<class T>
bool FileMappedVector<T>::getAutoFlush() const {
return m_autoFlush;
}

template<class T>
void FileMappedVector<T>::setAutoFlush(bool autoFlush) {
m_autoFlush = autoFlush;
}

template<class T>
void FileMappedVector<T>::flush() {
assert(isOpened());
Expand Down Expand Up @@ -904,12 +922,16 @@ uint64_t FileMappedVector<T>::nextCapacity() {

template<class T>
void FileMappedVector<T>::flushElement(uint64_t index) {
m_file.flush(reinterpret_cast<uint8_t*>(vectorDataPtr() + index), valueSize);
if (m_autoFlush) {
m_file.flush(reinterpret_cast<uint8_t*>(vectorDataPtr() + index), valueSize);
}
}

template<class T>
void FileMappedVector<T>::flushSize() {
m_file.flush(reinterpret_cast<uint8_t*>(sizePtr()), sizeof(uint64_t));
if (m_autoFlush) {
m_file.flush(reinterpret_cast<uint8_t*>(sizePtr()), sizeof(uint64_t));
}
}

}
2 changes: 1 addition & 1 deletion src/Common/IInputStream.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/IInputStream.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/IOutputStream.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/IOutputStream.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/JsonValue.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/JsonValue.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Math.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Math.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/MemoryInputStream.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/MemoryInputStream.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ObserverManager.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/PathTools.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/PathTools.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ScopeExit.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ScopeExit.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
2 changes: 1 addition & 1 deletion src/Common/ShuffleGenerator.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2012-2016, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
//
// This file is part of Bytecoin.
//
Expand Down
Loading

0 comments on commit d56f1c5

Please sign in to comment.