diff --git a/libethereum/Client.cpp b/libethereum/Client.cpp index 883b7f615..d2730fb98 100644 --- a/libethereum/Client.cpp +++ b/libethereum/Client.cpp @@ -729,16 +729,6 @@ void Client::doWork() } } -unsigned Client::numberOf(int _n) const -{ - if (_n > 0) - return _n; - else if (_n == GenesisBlock) - return 0; - else - return m_bc.details().number + max(-(int)m_bc.details().number, 1 + _n); -} - State Client::asOf(unsigned _h) const { ReadGuard l(x_stateDB); @@ -747,7 +737,7 @@ State Client::asOf(unsigned _h) const else if (_h == LatestBlock) return m_preMine; else - return State(m_stateDB, m_bc, m_bc.numberHash(numberOf(_h))); + return State(m_stateDB, m_bc, m_bc.numberHash(_h)); } State Client::state(unsigned _txi, h256 _block) const diff --git a/libethereum/Client.h b/libethereum/Client.h index f34eea5bf..6e34dc925 100644 --- a/libethereum/Client.h +++ b/libethereum/Client.h @@ -380,9 +380,6 @@ private: virtual bool turbo() const { return m_turboMining; } virtual bool force() const { return m_forceMining; } - /// Return the actual block number of the block with the given int-number (positive is the same, INT_MIN is genesis block, < 0 is negative age, thus -1 is most recently mined, 0 is pending. - unsigned numberOf(int _b) const; - /// Returns the state object for the full block (i.e. the terminal state) for index _h. /// Works properly with LatestBlock and PendingBlock. State asOf(unsigned _h) const;