cosmos-sdk/crypto/ledger_notavail.go

18 lines
465 B
Go
Raw Normal View History

// +build !cgo !ledger
// test_ledger_mock
package crypto
import (
"github.com/pkg/errors"
)
// If ledger support (build tag) has been enabled, which implies a CGO dependency,
// set the discoverLedger function which is responsible for loading the Ledger
// device at runtime or returning an error.
func init() {
2018-08-27 15:57:06 -07:00
discoverLedger = func() (LedgerSECP256K1, error) {
return nil, errors.New("support for ledger devices is not available in this executable")
}
}