Skip to content

Commit

Permalink
Simplify rollback visitor for send blocks (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptocode authored and clemahieu committed May 2, 2018
1 parent 9332f06 commit 5f4f7c7
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions rai/ledger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,9 @@ class rollback_visitor : public rai::block_visitor
if (previous != nullptr)
{
ledger.store.block_successor_clear (transaction, block_a.hashables.previous);
switch (previous->type ())
if (previous->type () < rai::block_type::state)
{
case rai::block_type::send:
case rai::block_type::receive:
case rai::block_type::open:
case rai::block_type::change:
{
ledger.store.frontier_put (transaction, block_a.hashables.previous, block_a.hashables.account);
break;
}
default:
break;
ledger.store.frontier_put (transaction, block_a.hashables.previous, block_a.hashables.account);
}
}
else
Expand Down

0 comments on commit 5f4f7c7

Please sign in to comment.