From 07e446d8daab985dacb5f6861243b94f49a81d2a Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 31 Oct 2014 11:55:59 +0100 Subject: [PATCH] Rename storage() -> storageOverlay(). --- libethereum/Account.h | 2 +- libethereum/State.cpp | 10 +++++----- libethereum/State.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libethereum/Account.h b/libethereum/Account.h index 3a078408d..ce7004083 100644 --- a/libethereum/Account.h +++ b/libethereum/Account.h @@ -123,7 +123,7 @@ public: h256 baseRoot() const { assert(m_storageRoot); return m_storageRoot; } /// @returns the storage overlay as a simple map. - std::map const& storage() const { return m_storageOverlay; } + std::map const& storageOverlay() const { return m_storageOverlay; } /// Set a key/value pair in the account's storage. This actually goes into the overlay, for committing /// to the trie later. diff --git a/libethereum/State.cpp b/libethereum/State.cpp index a438622fa..cb8906dc3 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -259,7 +259,7 @@ struct CachedAddressState ret[j.first] = RLP(j.second).toInt(); } if (s) - for (auto const& j: s->storage()) + for (auto const& j: s->storageOverlay()) if ((!ret.count(j.first) && j.second) || (ret.count(j.first) && ret.at(j.first) != j.second)) ret[j.first] = j.second; return ret; @@ -1011,8 +1011,8 @@ u256 State::storage(Address _id, u256 _memory) const return 0; // See if it's in the account's storage cache. - auto mit = it->second.storage().find(_memory); - if (mit != it->second.storage().end()) + auto mit = it->second.storageOverlay().find(_memory); + if (mit != it->second.storageOverlay().end()) return mit->second; // Not in the storage cache - go to the DB. @@ -1040,7 +1040,7 @@ map State::storage(Address _id) const } // Then merge cached storage over the top. - for (auto const& i: it->second.storage()) + for (auto const& i: it->second.storageOverlay()) if (i.second) ret[i.first] = i.second; else @@ -1394,7 +1394,7 @@ std::ostream& dev::eth::operator<<(std::ostream& _out, State const& _s) mem[j.first] = RLP(j.second).toInt(), back.insert(j.first); } if (cache) - for (auto const& j: cache->storage()) + for (auto const& j: cache->storageOverlay()) { if ((!mem.count(j.first) && j.second) || (mem.count(j.first) && mem.at(j.first) != j.second)) mem[j.first] = j.second, delta.insert(j.first); diff --git a/libethereum/State.h b/libethereum/State.h index 84371d62a..d966fb385 100644 --- a/libethereum/State.h +++ b/libethereum/State.h @@ -377,7 +377,7 @@ void commit(std::map const& _cache, DB& _db, TrieDB const& _cache, DB& _db, TrieDB storageDB(&_db, i.second.baseRoot()); - for (auto const& j: i.second.storage()) + for (auto const& j: i.second.storageOverlay()) if (j.second) storageDB.insert(j.first, rlp(j.second)); else