Browse Source

Transactions filter fix.

cl-refactor
Gav Wood 11 years ago
parent
commit
9d3a05e337
  1. 6
      alethzero/Main.ui
  2. 5
      alethzero/MainWin.cpp
  3. 1
      alethzero/MainWin.h
  4. 2
      libethereum/Client.cpp
  5. 3
      libethereum/Client.h

6
alethzero/Main.ui

@ -167,6 +167,7 @@
<addaction name="paranoia"/>
<addaction name="killBlockchain"/>
<addaction name="inject"/>
<addaction name="clearPending"/>
</widget>
<addaction name="menu_File"/>
<addaction name="menu_Network"/>
@ -1444,6 +1445,11 @@ font-size: 14pt</string>
<string>Shift+F10</string>
</property>
</action>
<action name="clearPending">
<property name="text">
<string>&amp;Clear Pending</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>

5
alethzero/MainWin.cpp

@ -197,6 +197,11 @@ Main::~Main()
writeSettings();
}
void Main::on_clearPending_triggered()
{
m_client->clearPending();
}
void Main::load(QString _s)
{
QFile fin(_s);

1
alethzero/MainWin.h

@ -114,6 +114,7 @@ private slots:
void on_showAllAccounts_triggered() { refresh(true); }
void on_loadJS_triggered();
void on_blockChainFilter_textChanged();
void on_clearPending_triggered();
void refresh(bool _override = false);
void refreshNetwork();

2
libethereum/Client.cpp

@ -386,7 +386,7 @@ PastTransactions Client::transactions(TransactionFilter const& _f) const
auto cn = m_bc.number();
auto h = m_bc.numberHash(begin);
for (unsigned n = begin; ret.size() != m; n--, h = m_bc.details(h).parent)
for (unsigned n = begin; ret.size() != m && n != end; n--, h = m_bc.details(h).parent)
{
try
{

3
libethereum/Client.h

@ -236,6 +236,9 @@ public:
/// Get and clear the mining history.
std::list<MineInfo> miningHistory() { auto ret = m_mineHistory; m_mineHistory.clear(); return ret; }
/// Clears pending transactions. Just for debug use.
void clearPending() { ClientGuard l(this); m_postMine = m_preMine; changed(); }
private:
void work();

Loading…
Cancel
Save