diff --git a/libethcore/ICAP.cpp b/libethcore/ICAP.cpp index 107d79db1..d4c4f9c46 100644 --- a/libethcore/ICAP.cpp +++ b/libethcore/ICAP.cpp @@ -141,15 +141,13 @@ Address ICAP::lookup(std::function const& _call, Address if (m_asset == "XET") { // TODO -// _call(_reg, ); - return Address(); + throw InterfaceNotSupported("ICAP::lookup(), XET asset"); } else if (m_asset == "ETH") { // TODO - // return resolve(m_institution + "/" + m_client).primary(); - return Address(); + throw InterfaceNotSupported("ICAP::lookup(), ETH asset"); } else throw InterfaceNotSupported("ICAP::lookup(), non XET asset"); diff --git a/libethcore/ICAP.h b/libethcore/ICAP.h index 7d5ce1f51..fd5db2f0a 100644 --- a/libethcore/ICAP.h +++ b/libethcore/ICAP.h @@ -39,6 +39,10 @@ struct InvalidICAP: virtual public dev::Exception {}; static const std::string EmptyString; +/** + * @brief Encapsulation of an ICAP address. + * Can be encoded, decoded, looked-up and inspected. + */ class ICAP { public: @@ -74,7 +78,7 @@ public: /// @returns type of ICAP. Type type() const { return m_type; } /// @returns target address. Only valid when type() == Direct. - Address const& direct() const { return m_type == Direct ? m_direct : Address(); } + Address const& direct() const { return m_type == Direct ? m_direct : ZeroAddress; } /// @returns asset. Only valid when type() == Indirect. std::string const& asset() const { return m_type == Indirect ? m_asset : EmptyString; } /// @returns target name. Only valid when type() == Indirect and asset() == "ETH". diff --git a/libethereum/Transaction.cpp b/libethereum/Transaction.cpp index 411c8bd99..975af53a5 100644 --- a/libethereum/Transaction.cpp +++ b/libethereum/Transaction.cpp @@ -105,7 +105,7 @@ Address const& Transaction::safeSender() const noexcept catch (...) { cwarn << "safeSender() did throw an exception: " << boost::current_exception_diagnostic_information(); - return NullAddress; + return ZeroAddress; } } diff --git a/libethereum/Transaction.h b/libethereum/Transaction.h index faf5ea07a..0ce536b78 100644 --- a/libethereum/Transaction.h +++ b/libethereum/Transaction.h @@ -97,8 +97,6 @@ struct ExecutionResult std::ostream& operator<<(std::ostream& _out, ExecutionResult const& _er); -static const Address NullAddress; - /// Encodes a transaction, ready to be exported to or freshly imported from RLP. class Transaction {