Browse Source

Move additional Trie implementations to tests where they belong.

cl-refactor
Gav Wood 11 years ago
parent
commit
82612a7027
  1. 3
      .gitignore
  2. 2
      libethereum/FixedHash.h
  3. 5
      test/MemTrie.cpp
  4. 3
      test/MemTrie.h
  5. 5
      test/TrieHash.cpp
  6. 4
      test/TrieHash.h
  7. 4
      test/trie.cpp

3
.gitignore

@ -19,9 +19,6 @@ ipch
*.opensdf
*.suo
# Generated headers
*.h
*.user
*.user.*
*~

2
libethereum/FixedHash.h

@ -62,7 +62,7 @@ public:
explicit FixedHash(byte const* _bs, ConstructFromPointerType) { memcpy(m_data.data(), _bs, N); }
/// Explicitly construct, copying from a string.
explicit FixedHash(std::string const& _s, ConstructFromStringType _t = FromHex): FixedHash(_t == FromHex ? fromHex(_s) : asBytes(_s)) {}
explicit FixedHash(std::string const& _s, ConstructFromStringType _t = FromHex): FixedHash(_t == FromHex ? fromHex(_s) : eth::asBytes(_s)) {}
/// Convert to arithmetic type.
operator Arith() const { return fromBigEndian<Arith>(m_data); }

5
libethereum/MemTrie.cpp → test/MemTrie.cpp

@ -19,9 +19,10 @@
* @date 2014
*/
#include "CommonEth.h"
#include "TrieCommon.h"
#include "MemTrie.h"
#include <CommonEth.h>
#include <TrieCommon.h>
using namespace std;
using namespace eth;

3
libethereum/MemTrie.h → test/MemTrie.h

@ -21,7 +21,8 @@
#pragma once
#include "Common.h"
#include <Common.h>
#include <FixedHash.h>
namespace eth
{

5
libethereum/TrieHash.cpp → test/TrieHash.cpp

@ -19,9 +19,10 @@
* @date 2014
*/
#include "CommonEth.h"
#include "TrieCommon.h"
#include "TrieHash.h"
#include <CommonEth.h>
#include <TrieCommon.h>
using namespace std;
using namespace eth;

4
libethereum/TrieHash.h → test/TrieHash.h

@ -21,8 +21,8 @@
#pragma once
#include "Common.h"
#include "FixedHash.h"
#include <Common.h>
#include <FixedHash.h>
namespace eth
{

4
test/trie.cpp

@ -24,9 +24,9 @@
#include "../json_spirit/json_spirit_reader_template.h"
#include "../json_spirit/json_spirit_writer_template.h"
#include <random>
#include <TrieHash.h>
#include <TrieDB.h>
#include <MemTrie.h>
#include "TrieHash.h"
#include "MemTrie.h"
using namespace std;
using namespace eth;

Loading…
Cancel
Save