diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-08-01 23:45:17 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-08-09 16:30:17 +0800 |
commit | db568a61e2a98880ab308bf2224aa34073dc7f39 (patch) | |
tree | 97da46661ad3002b6ff9f6dca07e3105da5a9c5a /accounts/usbwallet/usbwallet.go | |
parent | 17ce0a37de5a2712a8bf9d58df705e718b3b2cd6 (diff) | |
download | dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.tar dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.gz dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.bz2 dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.lz dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.xz dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.tar.zst dexon-db568a61e2a98880ab308bf2224aa34073dc7f39.zip |
accounts, console, internal: support trezor hardware wallet
Diffstat (limited to 'accounts/usbwallet/usbwallet.go')
-rw-r--r-- | accounts/usbwallet/usbwallet.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/accounts/usbwallet/usbwallet.go b/accounts/usbwallet/usbwallet.go index 938ab1e6a..3ed471693 100644 --- a/accounts/usbwallet/usbwallet.go +++ b/accounts/usbwallet/usbwallet.go @@ -17,9 +17,18 @@ // Package usbwallet implements support for USB hardware wallets. package usbwallet +import "time" + // deviceID is a combined vendor/product identifier to uniquely identify a USB // hardware device. type deviceID struct { Vendor uint16 // The Vendor identifer Product uint16 // The Product identifier } + +// Maximum time between wallet health checks to detect USB unplugs. +const heartbeatCycle = time.Second + +// Minimum time to wait between self derivation attempts, even it the user is +// requesting accounts like crazy. +const selfDeriveThrottling = time.Second |