Merge branch 'develop' into bug/245-exception-in-witness
This commit is contained in:
commit
745e40acb7
3 changed files with 33 additions and 32 deletions
|
|
@ -123,7 +123,7 @@ void database::reindex( fc::path data_dir )
|
||||||
}
|
}
|
||||||
for( uint32_t i = head_block_num() + 1; i <= last_block_num; ++i )
|
for( uint32_t i = head_block_num() + 1; i <= last_block_num; ++i )
|
||||||
{
|
{
|
||||||
if( i % 10000 == 0 )
|
if( i % 1000000 == 0 )
|
||||||
{
|
{
|
||||||
ilog( "Writing database to disk at block ${i}", ("i",i) );
|
ilog( "Writing database to disk at block ${i}", ("i",i) );
|
||||||
flush();
|
flush();
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ namespace graphene { namespace db {
|
||||||
{
|
{
|
||||||
unordered_map<object_id_type, unique_ptr<object> > old_values;
|
unordered_map<object_id_type, unique_ptr<object> > old_values;
|
||||||
unordered_map<object_id_type, object_id_type> old_index_next_ids;
|
unordered_map<object_id_type, object_id_type> old_index_next_ids;
|
||||||
std::unordered_set<object_id_type> new_ids;
|
std::set<object_id_type, std::greater<object_id_type> > new_ids;
|
||||||
unordered_map<object_id_type, unique_ptr<object> > removed;
|
unordered_map<object_id_type, unique_ptr<object> > removed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2201,13 +2201,10 @@ public:
|
||||||
std::vector<fc::optional<son_object>> son_objects = _remote_db->get_sons(son_ids);
|
std::vector<fc::optional<son_object>> son_objects = _remote_db->get_sons(son_ids);
|
||||||
vector<std::string> owners;
|
vector<std::string> owners;
|
||||||
for(auto obj: son_objects)
|
for(auto obj: son_objects)
|
||||||
{
|
|
||||||
if (obj)
|
|
||||||
{
|
{
|
||||||
std::string acc_id = account_id_to_string(obj->son_account);
|
std::string acc_id = account_id_to_string(obj->son_account);
|
||||||
owners.push_back(acc_id);
|
owners.push_back(acc_id);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
vector< optional< account_object> > accs = _remote_db->get_accounts(owners);
|
vector< optional< account_object> > accs = _remote_db->get_accounts(owners);
|
||||||
std::remove_if(son_objects.begin(), son_objects.end(),
|
std::remove_if(son_objects.begin(), son_objects.end(),
|
||||||
[](const fc::optional<son_object>& obj) -> bool { return obj.valid(); });
|
[](const fc::optional<son_object>& obj) -> bool { return obj.valid(); });
|
||||||
|
|
@ -2216,9 +2213,7 @@ public:
|
||||||
std::inserter(result, result.end()),
|
std::inserter(result, result.end()),
|
||||||
[](fc::optional<account_object>& acct, fc::optional<son_object> son) {
|
[](fc::optional<account_object>& acct, fc::optional<son_object> son) {
|
||||||
FC_ASSERT(acct, "Invalid active SONs list in global properties.");
|
FC_ASSERT(acct, "Invalid active SONs list in global properties.");
|
||||||
if (son.valid() && son->status != son_status::deregistered)
|
|
||||||
return std::make_pair<string, son_id_type>(string(acct->name), std::move(son->id));
|
return std::make_pair<string, son_id_type>(string(acct->name), std::move(son->id));
|
||||||
return std::make_pair<string, son_id_type>(string(acct->name), std::move(son_id_type()));
|
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
} FC_CAPTURE_AND_RETHROW() }
|
} FC_CAPTURE_AND_RETHROW() }
|
||||||
|
|
@ -4184,6 +4179,8 @@ string operation_printer::operator()(const transfer_operation& op) const
|
||||||
std::string memo;
|
std::string memo;
|
||||||
if( op.memo )
|
if( op.memo )
|
||||||
{
|
{
|
||||||
|
bool is_encrypted = ((op.memo->from != public_key_type()) && (op.memo->to != public_key_type()));
|
||||||
|
if (is_encrypted) {
|
||||||
if( wallet.is_locked() )
|
if( wallet.is_locked() )
|
||||||
{
|
{
|
||||||
out << " -- Unlock wallet to see memo.";
|
out << " -- Unlock wallet to see memo.";
|
||||||
|
|
@ -4206,6 +4203,10 @@ string operation_printer::operator()(const transfer_operation& op) const
|
||||||
elog("Error when decrypting memo: ${e}", ("e", e.to_detail_string()));
|
elog("Error when decrypting memo: ${e}", ("e", e.to_detail_string()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
memo = op.memo->get_message(private_key_type(), public_key_type());
|
||||||
|
out << " -- Memo: " << memo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fee(op.fee);
|
fee(op.fee);
|
||||||
return memo;
|
return memo;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue