Skip to content

Commit

Permalink
Changed cache storage after commiting transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
EDDragonWolf committed Feb 13, 2018
1 parent 5121f44 commit 3675eea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/supernode/WalletPayObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ bool supernode::WalletPayObject::PutTXToPool() {
}

m_TransactionPoolID = ptx->txid()[0];
m_Owner->storeWalletState(m_wallet.get());
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/supernode/baseclientproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool supernode::BaseClientProxy::GetWalletBalance(const supernode::rpc_command::
wal->refresh();
out.Balance = wal->balance();
out.UnlockedBalance = wal->unlocked_balance();
storeWalletState(std::move(wal));
storeWalletState(wal.get());
}
catch (const std::exception& e)
{
Expand Down Expand Up @@ -203,7 +203,7 @@ std::unique_ptr<tools::GraftWallet> supernode::BaseClientProxy::initWallet(const
return wal;
}

void supernode::BaseClientProxy::storeWalletState(std::unique_ptr<tools::GraftWallet> wallet)
void supernode::BaseClientProxy::storeWalletState(tools::GraftWallet *wallet)
{
if (wallet)
{
Expand Down
2 changes: 1 addition & 1 deletion src/supernode/baseclientproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BaseClientProxy : public BaseRTAProcessor
BaseClientProxy();

std::unique_ptr<tools::GraftWallet> initWallet(const std::string &account, const std::string &password) const;
void storeWalletState(std::unique_ptr<tools::GraftWallet> wallet);
void storeWalletState(tools::GraftWallet *wallet);

static std::string base64_decode(const std::string &encoded_data);
static std::string base64_encode(const std::string &data);
Expand Down

0 comments on commit 3675eea

Please sign in to comment.