Skip to content

Commit

Permalink
add better dummy device for ledger
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinullrich committed Nov 22, 2024
1 parent 208c244 commit 9a0f3cd
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions patches/monero/0016-add-dummy-device-for-ledger.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Subject: [PATCH 16/16] add dummy device for ledger
src/device/device.cpp | 10 ++--
src/device/device.hpp | 12 +---
src/device/device_io_dummy.cpp | 100 +++++++++++++++++++++++++++++++++
src/device/device_io_dummy.hpp | 74 ++++++++++++++++++++++++
src/device/device_io_dummy.hpp | 68 ++++++++++++++++++++++
src/device/device_ledger.cpp | 6 +-
src/device/device_ledger.hpp | 7 ++-
src/wallet/api/wallet.cpp | 13 +++++
src/wallet/api/wallet.h | 2 +
src/wallet/api/wallet2_api.h | 3 +
11 files changed, 218 insertions(+), 21 deletions(-)
11 files changed, 212 insertions(+), 21 deletions(-)
create mode 100644 src/device/device_io_dummy.cpp
create mode 100644 src/device/device_io_dummy.hpp

Expand Down Expand Up @@ -236,10 +236,10 @@ index 000000000..a5cbcb328
+#endif // HAVE_HIDAPI
diff --git a/src/device/device_io_dummy.hpp b/src/device/device_io_dummy.hpp
new file mode 100644
index 000000000..a1733616d
index 000000000..77c0a7cb1
--- /dev/null
+++ b/src/device/device_io_dummy.hpp
@@ -0,0 +1,74 @@
@@ -0,0 +1,68 @@
+// Copyright (c) 2017-2022, The Monero Project
+//
+// All rights reserved.
Expand Down Expand Up @@ -288,13 +288,7 @@ index 000000000..a1733616d
+ boost::mutex mutex;
+
+ public:
+ static bool stateIsConnected;
+ static unsigned char* sendToDevice;
+ static size_t sendToDeviceLength;
+ static unsigned char* receivedFromDevice;
+ static size_t receivedFromDeviceLength;
+ static bool waitsForDeviceSend;
+ static bool waitsForDeviceReceive;
+ static static int (*sendToLedgerDevice) (unsigned char *command, unsigned int cmd_len, unsigned char *response, unsigned int max_resp_len);
+
+ device_io_dummy() = default;
+ device_io_dummy(int a, int b, int c, int d);
Expand Down

0 comments on commit 9a0f3cd

Please sign in to comment.