Browse Source

Fix whitespace :-/

cl-refactor
Gav Wood 10 years ago
parent
commit
e7b40e5bdc
  1. 4
      alethzero/MainWin.cpp
  2. 6
      exp/main.cpp
  3. 2
      libethereum/Executive.cpp
  4. 30
      libethereum/State.cpp

4
alethzero/MainWin.cpp

@ -344,8 +344,8 @@ void Main::onNewBlock()
refreshBlockChain();
refreshAccounts();
// We must update balances since we can't filter updates to basic accounts.
refreshBalances();
// We must update balances since we can't filter updates to basic accounts.
refreshBalances();
}
void Main::onNewPending()

6
exp/main.cpp

@ -78,7 +78,7 @@ int main()
#elif 0
int main()
{
KeyPair u = KeyPair::create();
KeyPair u = KeyPair::create();
KeyPair cb = KeyPair::create();
OverlayDB db;
State s(cb.address(), db, BaseState::Empty);
@ -98,8 +98,8 @@ int main()
#else
int main()
{
cnote << KeyPair(Secret("0000000000000000000000000000000000000000000000000000000000000000")).address();
cnote << KeyPair(Secret("1111111111111111111111111111111111111111111111111111111111111111")).address();
cnote << KeyPair(Secret("0000000000000000000000000000000000000000000000000000000000000000")).address();
cnote << KeyPair(Secret("1111111111111111111111111111111111111111111111111111111111111111")).address();
}
#endif

2
libethereum/Executive.cpp

@ -35,7 +35,7 @@ using namespace dev::eth;
Executive::Executive(State& _s, BlockChain const& _bc, unsigned _level):
m_s(_s),
m_lastHashes(_s.getLastHashes(_bc, (unsigned)_s.info().number - 1)),
m_lastHashes(_s.getLastHashes(_bc, (unsigned)_s.info().number - 1)),
m_depth(_level)
{}

30
libethereum/State.cpp

@ -418,7 +418,7 @@ TransactionReceipts State::sync(BlockChain const& _bc, TransactionQueue& _tq, bo
TransactionReceipts ret;
auto ts = _tq.transactions();
auto lh = getLastHashes(_bc, _bc.number());
auto lh = getLastHashes(_bc, _bc.number());
for (int goodTxs = 1; goodTxs;)
{
@ -498,7 +498,7 @@ u256 State::enact(bytesConstRef _block, BlockChain const& _bc, bool _checkNonce)
GenericTrieDB<MemoryDB> receiptsTrie(&rm);
receiptsTrie.init();
LastHashes lh = getLastHashes(_bc, (unsigned)m_previousBlock.number);
LastHashes lh = getLastHashes(_bc, (unsigned)m_previousBlock.number);
// All ok with the block generally. Play back the transactions now...
unsigned i = 0;
@ -527,7 +527,7 @@ u256 State::enact(bytesConstRef _block, BlockChain const& _bc, bool _checkNonce)
cwarn << "Bad receipts state root.";
cwarn << "Block:" << toHex(_block);
cwarn << "Block RLP:" << RLP(_block);
cwarn << "Calculated: " << receiptsTrie.root();
cwarn << "Calculated: " << receiptsTrie.root();
for (unsigned j = 0; j < i; ++j)
{
RLPStream k;
@ -539,15 +539,15 @@ u256 State::enact(bytesConstRef _block, BlockChain const& _bc, bool _checkNonce)
cwarn << TransactionReceipt(&b);
}
cwarn << "Recorded: " << m_currentBlock.receiptsRoot;
auto rs = _bc.receipts(bi.hash);
for (unsigned j = 0; j < rs.receipts.size(); ++j)
{
auto b = rs.receipts[j].rlp();
cwarn << j << ": ";
cwarn << "RLP: " << RLP(b);
cwarn << "Hex: " << toHex(b);
cwarn << rs.receipts[j];
}
auto rs = _bc.receipts(bi.hash);
for (unsigned j = 0; j < rs.receipts.size(); ++j)
{
auto b = rs.receipts[j].rlp();
cwarn << j << ": ";
cwarn << "RLP: " << RLP(b);
cwarn << "Hex: " << toHex(b);
cwarn << rs.receipts[j];
}
BOOST_THROW_EXCEPTION(InvalidReceiptsStateRoot());
}
@ -1016,7 +1016,7 @@ LastHashes State::getLastHashes(BlockChain const& _bc, unsigned _n) const
ret.resize(256);
if (c_protocolVersion > 49)
{
ret[0] = _bc.numberHash(_n);
ret[0] = _bc.numberHash(_n);
for (unsigned i = 1; i < 256; ++i)
ret[i] = ret[i - 1] ? _bc.details(ret[i - 1]).parent : h256();
}
@ -1025,12 +1025,12 @@ LastHashes State::getLastHashes(BlockChain const& _bc, unsigned _n) const
u256 State::execute(BlockChain const& _bc, bytes const& _rlp, bytes* o_output, bool _commit)
{
return execute(getLastHashes(_bc, _bc.number()), &_rlp, o_output, _commit);
return execute(getLastHashes(_bc, _bc.number()), &_rlp, o_output, _commit);
}
u256 State::execute(BlockChain const& _bc, bytesConstRef _rlp, bytes* o_output, bool _commit)
{
return execute(getLastHashes(_bc, _bc.number()), _rlp, o_output, _commit);
return execute(getLastHashes(_bc, _bc.number()), _rlp, o_output, _commit);
}
// TODO: maintain node overlay revisions for stateroots -> each commit gives a stateroot + OverlayDB; allow overlay copying for rewind operations.

Loading…
Cancel
Save