diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-19 11:15:31 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-23 21:03:18 +0000 |
commit | d6937e373b32628fff414c7d8a07e4323593c6a0 (patch) | |
tree | ae3a73d35bf52c29d3560c8af83ec4b7aa4902c6 /src/device/device.hpp | |
parent | Merge pull request #4697 (diff) | |
download | monero-d6937e373b32628fff414c7d8a07e4323593c6a0.tar.xz |
ringct: use dummy bulletproofs when in fake mode, for speed
Diffstat (limited to '')
-rw-r--r-- | src/device/device.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/device/device.hpp b/src/device/device.hpp index cb9117650..815a0ab93 100644 --- a/src/device/device.hpp +++ b/src/device/device.hpp @@ -85,7 +85,7 @@ namespace hw { public: - device() {} + device(): mode(NONE) {} device(const device &hwdev) {} virtual ~device() {} @@ -115,7 +115,8 @@ namespace hw { virtual bool connect(void) = 0; virtual bool disconnect(void) = 0; - virtual bool set_mode(device_mode mode) = 0; + virtual bool set_mode(device_mode mode) { this->mode = mode; return true; } + virtual device_mode get_mode() const { return mode; } virtual device_type get_type() const = 0; @@ -202,6 +203,9 @@ namespace hw { virtual bool mlsag_sign(const rct::key &c, const rct::keyV &xx, const rct::keyV &alpha, const size_t rows, const size_t dsRows, rct::keyV &ss) = 0; virtual bool close_tx(void) = 0; + + protected: + device_mode mode; } ; struct reset_mode { |