Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Initial Transaction API #130

Merged
merged 9 commits into from
Aug 8, 2017
2 changes: 1 addition & 1 deletion libraries/chain/include/eos/chain/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ namespace eos { namespace chain {
transaction_object_type,
producer_object_type,
chain_property_object_type,
transaction_history_object_type, ///< Defined by account history plugin library
transaction_history_object_type, ///< Defined by account_history_plugin library
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize, I have been unclear. This comment claims the object is defined by a plugin library, but it's not a library, it's a plugin. The purpose of the comment is to make it easier to find the object without an IDE tracking references of transaction_history_object_type, so if it says "library" and "plugin", it's not obvious whether to look in the plugins or libraries directory. This comes from a plugin, so it should only say plugin and not library.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I apologize for not paying as close of attention to your original comment.

balance_object_type, ///< Defined by native_contract library
staked_balance_object_type, ///< Defined by native_contract library
producer_votes_object_type, ///< Defined by native_contract library
Expand Down
8 changes: 2 additions & 6 deletions plugins/account_history_plugin/account_history_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,8 @@ ProcessedTransaction account_history_plugin_impl::get_transaction(const chain::t
}

// ERROR in indexing logic
std::string msg = "transaction_id=" + transaction_id.str() + " indexed with block_id=" + block_id->str() + ", but ";
if (!block)
msg += "block was not found";
else
msg += "transaction was not found in the block";
BOOST_THROW_EXCEPTION( std::runtime_error( msg ) );
FC_ASSERT(block, "Transaction with ID ${tid} was indexed as being in block ID ${bid}, but no such block was found", ("tid", transaction_id)("bid", block_id));
FC_THROW("Transaction with ID ${tid} was indexed as being in block ID ${bid}, but was not found in that block", ("tid", transaction_id)("bid", block_id));
}

#warning TODO: lookup of recent transactions
Expand Down