From f2beea6de5c21a7b90981801edbe5d0029154c90 Mon Sep 17 00:00:00 2001 From: JoeGruff Date: Tue, 27 Apr 2021 17:27:08 +0900 Subject: [PATCH] Satisfy asset.Driver interface. --- server/asset/eth/eth.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server/asset/eth/eth.go b/server/asset/eth/eth.go index 13df01cfa4..080b483882 100644 --- a/server/asset/eth/eth.go +++ b/server/asset/eth/eth.go @@ -22,6 +22,7 @@ func init() { } const ( + version = 0 assetName = "eth" // coinIdSize = flags (2) + smart contract address where funds are locked (20) + secret // hash map key (32) @@ -32,13 +33,19 @@ const ( ) var ( - zeroHash = common.Hash{} - notImplementedErr = errors.New("not implemented") + zeroHash = common.Hash{} + notImplementedErr = errors.New("not implemented") + _ asset.Driver = (*Driver)(nil) ) // Driver implements asset.Driver. type Driver struct{} +// Version returns the Backend implementation's version number. +func (d *Driver) Version() uint32 { + return version +} + // Setup creates the ETH backend. Start the backend with its Run method. func (d *Driver) Setup(configPath string, logger dex.Logger, network dex.Network) (asset.Backend, error) { return NewBackend(configPath, logger, network)