Skip to content

Commit

Permalink
Merge pull request monero-project#7743
Browse files Browse the repository at this point in the history
8a67724 wallet_api: get bytes sent/received (tobtoht)
  • Loading branch information
luigi1111 committed Jun 24, 2021
2 parents 14a1b89 + 8a67724 commit 9c18f27
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/wallet/api/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2603,4 +2603,15 @@ bool WalletImpl::reconnectDevice()

return r;
}

uint64_t WalletImpl::getBytesReceived()
{
return m_wallet->get_bytes_received();
}

uint64_t WalletImpl::getBytesSent()
{
return m_wallet->get_bytes_sent();
}

} // namespace
2 changes: 2 additions & 0 deletions src/wallet/api/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ class WalletImpl : public Wallet
virtual uint64_t coldKeyImageSync(uint64_t &spent, uint64_t &unspent) override;
virtual void deviceShowAddress(uint32_t accountIndex, uint32_t addressIndex, const std::string &paymentId) override;
virtual bool reconnectDevice() override;
virtual uint64_t getBytesReceived() override;
virtual uint64_t getBytesSent() override;

private:
void clearStatus() const;
Expand Down
6 changes: 6 additions & 0 deletions src/wallet/api/wallet2_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,12 @@ struct Wallet

//! attempt to reconnect to hardware device
virtual bool reconnectDevice() = 0;

//! get bytes received
virtual uint64_t getBytesReceived() = 0;

//! get bytes sent
virtual uint64_t getBytesSent() = 0;
};

/**
Expand Down

0 comments on commit 9c18f27

Please sign in to comment.