Merge pull request #7743

8a67724 wallet_api: get bytes sent/received (tobtoht)
This commit is contained in:
luigi1111 2021-06-24 14:35:30 -05:00
commit 9c18f2767b
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
3 changed files with 19 additions and 0 deletions

View File

@ -2603,4 +2603,15 @@ bool WalletImpl::reconnectDevice()
return r; return r;
} }
uint64_t WalletImpl::getBytesReceived()
{
return m_wallet->get_bytes_received();
}
uint64_t WalletImpl::getBytesSent()
{
return m_wallet->get_bytes_sent();
}
} // namespace } // namespace

View File

@ -221,6 +221,8 @@ public:
virtual uint64_t coldKeyImageSync(uint64_t &spent, uint64_t &unspent) override; 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 void deviceShowAddress(uint32_t accountIndex, uint32_t addressIndex, const std::string &paymentId) override;
virtual bool reconnectDevice() override; virtual bool reconnectDevice() override;
virtual uint64_t getBytesReceived() override;
virtual uint64_t getBytesSent() override;
private: private:
void clearStatus() const; void clearStatus() const;

View File

@ -1087,6 +1087,12 @@ struct Wallet
//! attempt to reconnect to hardware device //! attempt to reconnect to hardware device
virtual bool reconnectDevice() = 0; virtual bool reconnectDevice() = 0;
//! get bytes received
virtual uint64_t getBytesReceived() = 0;
//! get bytes sent
virtual uint64_t getBytesSent() = 0;
}; };
/** /**