Browse Source

Renamed method.

cl-refactor
Christian 10 years ago
parent
commit
78d9e1be94
  1. 2
      libweb3jsonrpc/AccountHolder.cpp
  2. 2
      libweb3jsonrpc/AccountHolder.h
  3. 4
      libweb3jsonrpc/WebThreeStubServerBase.cpp

2
libweb3jsonrpc/AccountHolder.cpp

@ -50,7 +50,7 @@ vector<Address> AccountHolder::getAllAccounts() const
return accounts;
}
Address const& AccountHolder::getDefaultCallAccount() const
Address const& AccountHolder::getDefaultTransactAccount() const
{
if (m_accounts.empty())
return ZeroAddress;

2
libweb3jsonrpc/AccountHolder.h

@ -52,7 +52,7 @@ public:
bool isProxyAccount(Address const& _account) const { return m_proxyAccounts.count(_account) > 0; }
Secret const& secretKey(Address const& _account) const { return m_keyPairs.at(_account).secret(); }
std::vector<Address> getAllAccounts() const;
Address const& getDefaultCallAccount() const;
Address const& getDefaultTransactAccount() const;
int addProxyAccount(Address const& _account);
bool removeProxyAccount(unsigned _id);

4
libweb3jsonrpc/WebThreeStubServerBase.cpp

@ -330,7 +330,7 @@ std::string WebThreeStubServerBase::eth_call(Json::Value const& _json)
std::string ret;
TransactionSkeleton t = toTransaction(_json);
if (!t.from)
t.from = m_accounts->getDefaultCallAccount();
t.from = m_accounts->getDefaultTransactAccount();
if (!m_accounts->isRealAccount(t.from))
return ret;
if (!t.gasPrice)
@ -701,7 +701,7 @@ std::string WebThreeStubServerBase::eth_transact(Json::Value const& _json)
std::string ret;
TransactionSkeleton t = toTransaction(_json);
if (!t.from)
t.from = m_accounts->getDefaultCallAccount();
t.from = m_accounts->getDefaultTransactAccount();
if (!t.gasPrice)
t.gasPrice = 10 * dev::eth::szabo;
if (!t.gas)

Loading…
Cancel
Save